From e649d1adfda52bf04b6a124f440fc7ec6a07b966 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Nov 2022 14:09:44 +0100 Subject: [PATCH] Stop using ReadInteraction APIs for Darwin framework read/subscribe. This reduces Darwin build CI times from ~2 hours 30 mins to ~1 hour 20 mins and reduces the size of a release unstripped framework from ~430MB to ~300MB. Also fixes support for setting resubscribeIfLost to false in the Darwin "subscribe an attribute" APIs. --- .../CHIP/MTRBaseClustersCpp_Internal.h | 263 + src/darwin/Framework/CHIP/MTRBaseDevice.mm | 13 +- .../CHIP/MTRCallbackBridgeBase_internal.h | 1 + src/darwin/Framework/CHIP/MTRCluster.mm | 13 + .../Framework/CHIP/MTRCluster_internal.h | 16 + .../CHIP/templates/MTRBaseClusters-src.zapt | 55 +- .../CHIP/templates/MTRBaseClusters.zapt | 4 - .../templates/partials/MTRCallbackBridge.zapt | 13 +- .../CHIP/zap-generated/MTRBaseClusters.h | 4348 -- .../CHIP/zap-generated/MTRBaseClusters.mm | 47839 +++------------- .../CHIP/zap-generated/MTRCallbackBridge.mm | 5907 +- .../MTRCallbackBridge_internal.h | 1050 +- .../Matter.xcodeproj/project.pbxproj | 4 + 13 files changed, 12308 insertions(+), 47218 deletions(-) create mode 100644 src/darwin/Framework/CHIP/MTRBaseClustersCpp_Internal.h diff --git a/src/darwin/Framework/CHIP/MTRBaseClustersCpp_Internal.h b/src/darwin/Framework/CHIP/MTRBaseClustersCpp_Internal.h new file mode 100644 index 00000000000000..cdb2ab72a70f70 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRBaseClustersCpp_Internal.h @@ -0,0 +1,263 @@ +/* + * Copyright (c) 2022 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. + */ +#import + +#import "MTRBaseDevice.h" +#import "MTRCluster_internal.h" +#import "zap-generated/MTRCallbackBridge_internal.h" + +#include +#include +#include +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Utility functions base clusters use for doing reads and subscribes. + */ +template +class MTRAttributeReportCallback : public chip::app::ReadClient::Callback { +public: + MTRAttributeReportCallback(BridgeType * _Nonnull bridge, typename BridgeType::SuccessCallbackType _Nonnull onAttributeReport, + MTRErrorCallback _Nonnull onError, chip::ClusterId clusterID, chip::AttributeId attributeID) + : mBridge(bridge) + , mOnAttributeReport(onAttributeReport) + , mOnError(onError) + , mClusterID(clusterID) + , mAttributeID(attributeID) + , mBufferedReadAdapter(*this) + { + } + + ~MTRAttributeReportCallback() {} + + chip::app::BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } + + void AdoptReadClient(chip::Platform::UniquePtr readClient) { mReadClient = std::move(readClient); } + +protected: + void OnAttributeData( + const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data, const chip::app::StatusIB & status) override + { + if (mCalledCallback && mReadClient->IsReadType()) { + return; + } + mCalledCallback = true; + + CHIP_ERROR err = CHIP_NO_ERROR; + DecodableAttributeType value; + + // + // 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(!path.IsListItemOperation()); + + VerifyOrExit(status.IsSuccess(), err = status.ToChipError()); + VerifyOrExit(path.mClusterId == mClusterID && path.mAttributeId == mAttributeID, err = CHIP_ERROR_SCHEMA_MISMATCH); + VerifyOrExit(data != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); + + SuccessOrExit(err = chip::app::DataModel::Decode(*data, value)); + + mOnAttributeReport(mBridge, value); + + exit: + if (err != CHIP_NO_ERROR) { + mOnError(mBridge, err); + } + } + + void OnError(CHIP_ERROR error) override + { + if (mCalledCallback && mReadClient->IsReadType()) { + return; + } + mCalledCallback = true; + + mOnError(mBridge, error); + } + + void OnDone(chip::app::ReadClient *) override { chip::Platform::Delete(this); } + + BridgeType * _Nonnull mBridge; + + chip::ClusterId mClusterID; + chip::AttributeId mAttributeID; + typename BridgeType::SuccessCallbackType mOnAttributeReport; + MTRErrorCallback mOnError; + chip::app::BufferedReadCallback mBufferedReadAdapter; + chip::Platform::UniquePtr mReadClient; + // For reads, we ensure that we make only one data/error callback to our consumer. + bool mCalledCallback = false; +}; + +template +class MTRAttributeSubscriptionCallback : public MTRAttributeReportCallback { +public: + MTRAttributeSubscriptionCallback(SubscriptionBridgeType * _Nonnull bridge, + typename SubscriptionBridgeType::SuccessCallbackType onAttributeReport, MTRErrorCallback onError, chip::ClusterId clusterID, + chip::AttributeId attributeID) + : MTRAttributeReportCallback( + bridge, onAttributeReport, onError, clusterID, attributeID) + { + } + + ~MTRAttributeSubscriptionCallback() + { + // Ensure we release the ReadClient before we tear down anything else, + // so it can call our OnDeallocatePaths properly. + this->mReadClient = nullptr; + } + +private: + // The superclass OnResubscriptionNeeded is fine for our purposes. + + void OnDeallocatePaths(chip::app::ReadPrepareParams && readPrepareParams) override + { + VerifyOrDie(readPrepareParams.mAttributePathParamsListSize == 1 && readPrepareParams.mpAttributePathParamsList != nullptr); + chip::Platform::Delete(readPrepareParams.mpAttributePathParamsList); + + if (readPrepareParams.mDataVersionFilterListSize == 1 && readPrepareParams.mpDataVersionFilterList != nullptr) { + chip::Platform::Delete(readPrepareParams.mpDataVersionFilterList); + } + } + + void OnSubscriptionEstablished(chip::SubscriptionId subscriptionId) override { this->mBridge->OnSubscriptionEstablished(); } + + void OnDone(chip::app::ReadClient * readClient) override + { + this->mBridge->OnDone(); + MTRAttributeReportCallback::OnDone(readClient); + } +}; + +template +CHIP_ERROR MTRStartReadInteraction(BridgeType * _Nonnull bridge, MTRReadParams * params, + chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, + typename BridgeType::SuccessCallbackType successCb, MTRErrorCallback failureCb, chip::EndpointId endpoint, + chip::ClusterId clusterID, chip::AttributeId attributeID) +{ + auto readPaths = chip::Platform::MakeUnique(endpoint, clusterID, attributeID); + VerifyOrReturnError(readPaths != nullptr, CHIP_ERROR_NO_MEMORY); + + chip::app::ReadPrepareParams readPrepareParams(session); + [params toReadPrepareParams:readPrepareParams]; + readPrepareParams.mpAttributePathParamsList = readPaths.get(); + readPrepareParams.mAttributePathParamsListSize = 1; + + auto callback = chip::Platform::MakeUnique>( + bridge, successCb, failureCb, clusterID, attributeID); + VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); + + auto readClient = chip::Platform::MakeUnique(chip::app::InteractionModelEngine::GetInstance(), + &exchangeManager, callback->GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read); + VerifyOrReturnError(readClient != nullptr, CHIP_ERROR_NO_MEMORY); + + CHIP_ERROR err = readClient->SendRequest(readPrepareParams); + ReturnErrorOnFailure(err); + + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + + return CHIP_NO_ERROR; +} + +template +CHIP_ERROR MTRStartSubscribeInteraction(BridgeType * _Nonnull bridge, MTRSubscribeParams * params, + chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, + typename BridgeType::SuccessCallbackType successCb, MTRErrorCallback failureCb, chip::EndpointId endpoint, + chip::ClusterId clusterID, chip::AttributeId attributeID) +{ + auto readPaths = chip::Platform::MakeUnique(endpoint, clusterID, attributeID); + VerifyOrReturnError(readPaths != nullptr, CHIP_ERROR_NO_MEMORY); + + chip::app::ReadPrepareParams readPrepareParams(session); + [params toReadPrepareParams:readPrepareParams]; + readPrepareParams.mpAttributePathParamsList = readPaths.get(); + readPrepareParams.mAttributePathParamsListSize = 1; + + auto callback = chip::Platform::MakeUnique>( + bridge, successCb, failureCb, clusterID, attributeID); + VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); + + auto readClient = chip::Platform::MakeUnique(chip::app::InteractionModelEngine::GetInstance(), + &exchangeManager, callback->GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); + VerifyOrReturnError(readClient != nullptr, CHIP_ERROR_NO_MEMORY); + + CHIP_ERROR err; + if (params.resubscribeIfLost) { + readPaths.release(); + + err = readClient->SendAutoResubscribeRequest(std::move(readPrepareParams)); + } else { + err = readClient->SendRequest(readPrepareParams); + } + ReturnErrorOnFailure(err); + + bridge->KeepAliveOnCallback(); + + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + + return CHIP_NO_ERROR; +} + +template +void MTRSubscribeAttribute(MTRSubscribeParams * _Nonnull params, + MTRSubscriptionEstablishedHandler _Nullable subscriptionEstablished, + void (^reportHandler)(AttributeObjCType * _Nullable value, NSError * _Nullable error), dispatch_queue_t callbackQueue, + MTRBaseDevice * device, chip::EndpointId endpoint, chip::ClusterId clusterID, chip::AttributeId attributeID) +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * callbackBridge = new SubscriptionBridgeType( + callbackQueue, + // This treats reportHandler as taking an id for the data. This is + // not great from a type-safety perspective, of course. + reportHandler, + ^(chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, + typename SubscriptionBridgeType::SuccessCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * subscriptionBridge = static_cast(bridge); + return MTRStartSubscribeInteraction( + subscriptionBridge, params, exchangeManager, session, successCb, failureCb, endpoint, clusterID, attributeID); + }, + subscriptionEstablished); + std::move(*callbackBridge).DispatchAction(device); +} + +template +void MTRReadAttribute(MTRReadParams * _Nonnull params, + void (^reportHandler)(AttributeObjCType * _Nullable value, NSError * _Nullable error), dispatch_queue_t callbackQueue, + MTRBaseDevice * device, chip::EndpointId endpoint, chip::ClusterId clusterID, chip::AttributeId attributeID) +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * callbackBridge = new ReadBridgeType(callbackQueue, + // This treats reportHandler as taking an id for the data. This is + // not great from a type-safety perspective, of course. + reportHandler, + ^(chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, + typename ReadBridgeType::SuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * readBridge = static_cast(bridge); + return MTRStartReadInteraction( + readBridge, params, exchangeManager, session, successCb, failureCb, endpoint, clusterID, attributeID); + }); + std::move(*callbackBridge).DispatchAction(device); +} + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index d4b9f1187f1915..366e396c5ffede 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -21,6 +21,7 @@ #import "MTRBaseSubscriptionCallback.h" #import "MTRCallbackBridgeBase_internal.h" #import "MTRCluster.h" +#import "MTRCluster_internal.h" #import "MTRError_Internal.h" #import "MTREventTLVValueDecoder_Internal.h" #import "MTRLogging.h" @@ -302,14 +303,11 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue // We want to get event reports at the minInterval, not the maxInterval. eventPath->mIsUrgentEvent = true; ReadPrepareParams readParams(session.Value()); - readParams.mMinIntervalFloorSeconds = [params.minInterval unsignedShortValue]; - readParams.mMaxIntervalCeilingSeconds = [params.maxInterval unsignedShortValue]; + [params toReadPrepareParams:readParams]; readParams.mpAttributePathParamsList = attributePath.get(); readParams.mAttributePathParamsListSize = 1; readParams.mpEventPathParamsList = eventPath.get(); readParams.mEventPathParamsListSize = 1; - readParams.mIsFabricFiltered = params.filterByFabric; - readParams.mKeepSubscriptions = !params.replaceExistingSubscriptions; std::unique_ptr attributeCache; ReadClient::Callback * callbackForReadClient = nullptr; @@ -831,9 +829,9 @@ - (void)readAttributesWithEndpointID:(NSNumber * _Nullable)endpointID CHIP_ERROR err = CHIP_NO_ERROR; chip::app::ReadPrepareParams readParams(session); + [params toReadPrepareParams:readParams]; readParams.mpAttributePathParamsList = &attributePath; readParams.mAttributePathParamsListSize = 1; - readParams.mIsFabricFiltered = params.filterByFabric; auto onDone = [resultArray, resultSuccess, resultFailure, bridge, successCb, failureCb]( BufferedReadAttributeCallback * callback) { @@ -1200,12 +1198,9 @@ - (void)subscribeToAttributesWithEndpointID:(NSNumber * _Nullable)endpointID CHIP_ERROR err = CHIP_NO_ERROR; chip::app::ReadPrepareParams readParams(session.Value()); + [params toReadPrepareParams:readParams]; readParams.mpAttributePathParamsList = container.pathParams; readParams.mAttributePathParamsListSize = 1; - readParams.mMinIntervalFloorSeconds = static_cast([params.minInterval unsignedShortValue]); - readParams.mMaxIntervalCeilingSeconds = static_cast([params.maxInterval unsignedShortValue]); - readParams.mIsFabricFiltered = params.filterByFabric; - readParams.mKeepSubscriptions = !params.replaceExistingSubscriptions; auto onDone = [container](BufferedReadAttributeCallback * callback) { [container onDone]; diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h index 5e4913a7a05880..31ac86e348f8bc 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h @@ -67,6 +67,7 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { public: using MTRActionBlock = MTRActionBlockT; using MTRLocalActionBlock = MTRLocalActionBlockT; + using SuccessCallbackType = T; /** * Construct a callback bridge, which can then have DispatcLocalAction() called diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index da59dfa1683ec5..0aee96929278ae 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -77,6 +77,11 @@ - (id)copyWithZone:(NSZone * _Nullable)zone return other; } +- (void)toReadPrepareParams:(chip::app::ReadPrepareParams &)readPrepareParams +{ + readPrepareParams.mIsFabricFiltered = self.filterByFabric; +} + @end @implementation MTRSubscribeParams @@ -100,6 +105,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone return other; } +- (void)toReadPrepareParams:(chip::app::ReadPrepareParams &)readPrepareParams +{ + [super toReadPrepareParams:readPrepareParams]; + readPrepareParams.mMinIntervalFloorSeconds = self.minInterval.unsignedShortValue; + readPrepareParams.mMaxIntervalCeilingSeconds = self.maxInterval.unsignedShortValue; + readPrepareParams.mKeepSubscriptions = !self.replaceExistingSubscriptions; +} + @end @implementation MTRReadParams (Deprecated) diff --git a/src/darwin/Framework/CHIP/MTRCluster_internal.h b/src/darwin/Framework/CHIP/MTRCluster_internal.h index 1ea8e80b01237c..5683ca717fea57 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_internal.h @@ -24,6 +24,8 @@ #import "zap-generated/CHIPClusters.h" #import "zap-generated/MTRBaseClusters.h" +#include + NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @@ -33,4 +35,18 @@ NS_ASSUME_NONNULL_BEGIN - (chip::CharSpan)asCharSpan:(NSString *)value; @end +@interface MTRReadParams () +/** + * Copy state from this MTRReadParams to the ReadPreparaParams. + */ +- (void)toReadPrepareParams:(chip::app::ReadPrepareParams &)readPrepareParams; +@end + +@interface MTRSubscribeParams () +/** + * Copy state from this MTRReadParams to the ReadPreparaParams. + */ +- (void)toReadPrepareParams:(chip::app::ReadPrepareParams &)readPrepareParams; +@end + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index 768ae191d21e9e..b5fe8057db0d21 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -10,11 +10,11 @@ #import "MTRCluster_internal.h" #import "MTRStructsObjc.h" #import "MTRCommandPayloadsObjc.h" +#import "MTRBaseClustersCpp_Internal.h" #include #include #include -#include using chip::Callback::Callback; using chip::Callback::Cancelable; @@ -114,21 +114,13 @@ using chip::SessionHandle; {{~#if_is_fabric_scoped_struct type}} // Make a copy of params before we go async. params = [params copy]; + {{else}} + MTRReadParams * params = [[MTRReadParams alloc] init]; {{/if_is_fabric_scoped_struct~}} - auto * bridge = new MTR{{>attribute_data_callback_name}}CallbackBridge(self.callbackQueue, - {{! This treats completion as taking an id for the data. This is - not great from a type-safety perspective, of course. }} - completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>attribute_data_callback_name}}Callback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb - {{~#if_is_fabric_scoped_struct type~}} - , params.filterByFabric - {{~/if_is_fabric_scoped_struct~}} - ); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; + return MTRReadAttributeattribute_data_callback_name}}CallbackBridge, + {{asObjectiveCClass type parent.name}}, + TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } {{#if isWritableAttribute}} @@ -177,38 +169,11 @@ using chip::SessionHandle; {{/if}} {{#if isReportableAttribute}} - (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams * _Nonnull)params -subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge(self.callbackQueue, - {{! This treats reportHandler as taking an id for the data. This is - not great from a type-safety perspective, of course. }} - reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>attribute_data_callback_name}}Callback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_castattribute_data_callback_name}}CallbackSubscriptionBridge *>(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - - chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, - !params.replaceExistingSubscriptions, - chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); } - ); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; + MTRSubscribeAttributeattribute_data_callback_name}}CallbackSubscriptionBridge, {{asObjectiveCClass type parent.name}}, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index e9c1326acf3df1..0c75ed779a203b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -43,10 +43,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; {{/if}} {{#if isReportableAttribute}} -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index 433a069db99d5b..91e913926505de 100644 --- a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt @@ -47,7 +47,7 @@ public: mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTR{{> @partial-block}}Bridge::OnDone; using MTR{{> @partial-block}}Bridge::KeepAliveOnCallback; @@ -97,19 +97,18 @@ void MTR{{> @partial-block}}Bridge::OnSuccessFn(void * context }; {{#unless partial-type}} -void MTR{{> @partial-block}}SubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTR{{> @partial-block}}SubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast @partial-block}}SubscriptionBridge *>(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 7c4f33c5fe623a..061ff6608c0bb2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -46,10 +46,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -62,10 +58,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -78,10 +70,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -94,10 +82,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -110,10 +94,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -126,10 +106,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -142,10 +118,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -191,10 +163,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -207,10 +175,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -223,10 +187,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -239,10 +199,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -255,10 +211,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -271,10 +223,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -332,10 +280,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -348,10 +292,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -364,10 +304,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -380,10 +316,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -396,10 +328,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -412,10 +340,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -428,10 +352,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -444,10 +364,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -460,10 +376,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -476,10 +388,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -492,10 +400,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -538,10 +442,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -554,10 +454,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -574,10 +470,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -595,10 +487,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -616,10 +504,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -632,10 +516,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -648,10 +528,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -664,10 +540,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -680,10 +552,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -696,10 +564,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -727,10 +591,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -748,10 +608,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -764,10 +620,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -780,10 +632,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -796,10 +644,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -812,10 +656,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -828,10 +668,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -875,10 +711,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -891,10 +723,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -907,10 +735,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -923,10 +747,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -939,10 +759,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -955,10 +771,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -971,10 +783,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -991,10 +799,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1012,10 +816,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -1032,10 +832,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1053,10 +849,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1074,10 +866,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1095,10 +883,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1116,10 +900,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -1132,10 +912,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1148,10 +924,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1164,10 +936,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1180,10 +948,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1196,10 +960,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1231,10 +991,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -1252,10 +1008,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -1273,10 +1025,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -1294,10 +1042,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1310,10 +1054,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1331,10 +1071,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1352,10 +1088,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1368,10 +1100,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1384,10 +1112,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1400,10 +1124,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1416,10 +1136,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1432,10 +1148,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1448,10 +1160,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1464,10 +1172,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1496,10 +1200,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1512,10 +1212,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1528,10 +1224,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1544,10 +1236,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1560,10 +1248,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1576,10 +1260,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1592,10 +1272,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1608,10 +1284,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1624,10 +1296,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1660,10 +1328,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1676,10 +1340,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1692,10 +1352,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1708,10 +1364,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1724,10 +1376,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1740,10 +1388,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1778,10 +1422,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAclWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1799,10 +1439,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1815,10 +1451,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1832,10 +1464,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1849,10 +1477,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1866,10 +1490,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1882,10 +1502,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -1898,10 +1514,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -1914,10 +1526,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1930,10 +1538,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -1986,10 +1590,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2002,10 +1602,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2018,10 +1614,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2034,10 +1626,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2050,10 +1638,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2066,10 +1650,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2082,10 +1662,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2098,10 +1674,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2135,10 +1707,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2151,10 +1719,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2167,10 +1731,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2183,10 +1743,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2199,10 +1755,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2219,10 +1771,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2239,10 +1787,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2255,10 +1799,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2271,10 +1811,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -2287,10 +1823,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2303,10 +1835,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -2319,10 +1847,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2335,10 +1859,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2351,10 +1871,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2367,10 +1883,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2383,10 +1895,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2404,10 +1912,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -2420,10 +1924,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2436,10 +1936,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2452,10 +1948,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, @@ -2468,10 +1960,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2484,10 +1972,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2500,10 +1984,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2516,10 +1996,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2532,10 +2008,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2572,10 +2044,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2588,10 +2056,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2604,10 +2068,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2620,10 +2080,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2636,10 +2092,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2676,10 +2128,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2692,10 +2140,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2708,10 +2152,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2724,10 +2164,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -2740,10 +2176,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2756,10 +2188,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2772,10 +2200,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2788,10 +2212,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2804,10 +2224,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2843,10 +2259,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -2859,10 +2271,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2875,10 +2283,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2891,10 +2295,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -2907,10 +2307,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -2923,10 +2319,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2939,10 +2331,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2977,10 +2365,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -2998,10 +2382,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3014,10 +2394,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3030,10 +2406,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3046,10 +2418,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3062,10 +2430,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3078,10 +2442,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3094,10 +2454,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3133,10 +2489,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3149,10 +2501,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3165,10 +2513,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3181,10 +2525,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3197,10 +2537,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3213,10 +2549,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3244,10 +2576,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3260,10 +2588,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3276,10 +2600,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3292,10 +2612,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3308,10 +2624,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3324,10 +2636,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3356,10 +2664,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3372,10 +2676,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3388,10 +2688,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -3404,10 +2700,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3420,10 +2712,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3436,10 +2724,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3452,10 +2736,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3468,10 +2748,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3484,10 +2760,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3500,10 +2772,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3516,10 +2784,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3532,10 +2796,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3548,10 +2808,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3564,10 +2820,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3580,10 +2832,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3596,10 +2844,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3612,10 +2856,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3628,10 +2868,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3644,10 +2880,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3660,10 +2892,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -3676,10 +2904,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3692,10 +2916,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -3708,10 +2928,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -3724,10 +2940,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3740,10 +2952,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3756,10 +2964,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3772,10 +2976,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3788,10 +2988,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3804,10 +3000,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3820,10 +3012,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -3836,10 +3024,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3852,10 +3036,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3868,10 +3048,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -3884,10 +3060,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -3900,10 +3072,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3916,10 +3084,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3965,10 +3129,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -3982,10 +3142,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBasicCommissioningInfoWithCompletion: (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: @@ -4001,10 +3157,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4017,10 +3169,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4033,10 +3181,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4050,10 +3194,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4066,10 +3206,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4082,10 +3218,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4098,10 +3230,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4114,10 +3242,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4164,10 +3288,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4180,10 +3300,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4196,10 +3312,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4212,10 +3324,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4233,10 +3341,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4249,10 +3353,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4265,10 +3365,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -4281,10 +3377,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4297,10 +3389,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4313,10 +3401,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4329,10 +3413,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4345,10 +3425,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4361,10 +3437,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4396,10 +3468,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4412,10 +3480,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4428,10 +3492,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4444,10 +3504,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4460,10 +3516,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4495,10 +3547,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4511,10 +3559,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4527,10 +3571,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4543,10 +3583,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4559,10 +3595,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4575,10 +3607,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4591,10 +3619,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4607,10 +3631,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4623,10 +3643,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4639,10 +3655,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4655,10 +3667,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4671,10 +3679,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4687,10 +3691,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4703,10 +3703,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4739,10 +3735,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4755,10 +3747,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4771,10 +3759,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4787,10 +3771,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -4803,10 +3783,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4819,10 +3795,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -4835,10 +3807,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -4851,10 +3819,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4867,10 +3831,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4903,10 +3863,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4919,10 +3875,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4935,10 +3887,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -4951,10 +3899,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4967,10 +3911,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -4983,10 +3923,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -4999,10 +3935,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5015,10 +3947,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -5031,10 +3959,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -5047,10 +3971,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5063,10 +3983,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5079,10 +3995,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5095,10 +4007,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5111,10 +4019,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5127,10 +4031,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5143,10 +4043,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5159,10 +4055,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5175,10 +4067,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5191,10 +4079,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5207,10 +4091,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5223,10 +4103,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5242,10 +4118,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5258,10 +4130,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5274,10 +4142,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5290,10 +4154,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5306,10 +4166,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5322,10 +4178,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5338,10 +4190,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5354,10 +4202,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5370,10 +4214,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5386,10 +4226,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5402,10 +4238,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5418,10 +4250,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5434,10 +4262,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5450,10 +4274,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5466,10 +4286,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5483,10 +4299,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5499,10 +4311,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5515,10 +4323,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5531,10 +4335,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5547,10 +4347,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5563,10 +4359,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5579,10 +4371,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5595,10 +4383,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5611,10 +4395,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5627,10 +4407,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5643,10 +4419,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5659,10 +4431,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5675,10 +4443,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5691,10 +4455,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5707,10 +4467,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5723,10 +4479,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5739,10 +4491,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -5755,10 +4503,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5771,10 +4515,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5787,10 +4527,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5803,10 +4539,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5819,10 +4551,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5835,10 +4563,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5851,10 +4575,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, @@ -5867,10 +4587,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -5884,10 +4600,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOperationalDatasetComponentsWithCompletion: (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void) subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5906,10 +4618,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -5922,10 +4630,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -5938,10 +4642,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -5954,10 +4654,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -5970,10 +4666,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -5986,10 +4678,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6022,10 +4710,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -6038,10 +4722,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6054,10 +4734,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6070,10 +4746,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6086,10 +4758,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6102,10 +4770,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6118,10 +4782,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6134,10 +4794,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -6150,10 +4806,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -6166,10 +4818,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -6182,10 +4830,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -6198,10 +4842,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6214,10 +4854,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6230,10 +4866,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6246,10 +4878,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6262,10 +4890,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -6278,10 +4902,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6294,10 +4914,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6330,10 +4946,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6346,10 +4958,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6362,10 +4970,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6378,10 +4982,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6394,10 +4994,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6410,10 +5006,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6426,10 +5018,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6442,10 +5030,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6458,10 +5042,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6474,10 +5054,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6490,10 +5066,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6506,10 +5078,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -6522,10 +5090,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6538,10 +5102,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6572,10 +5132,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6588,10 +5144,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6604,10 +5156,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6624,10 +5172,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6640,10 +5184,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6656,10 +5196,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -6672,10 +5208,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6688,10 +5220,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -6704,10 +5232,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6720,10 +5244,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6736,10 +5256,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6752,10 +5268,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6768,10 +5280,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6784,10 +5292,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6800,10 +5304,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -6816,10 +5316,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6832,10 +5328,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6848,10 +5340,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -6864,10 +5352,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6880,10 +5364,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6916,10 +5396,6 @@ light or a window shade. - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6932,10 +5408,6 @@ light or a window shade. - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6948,10 +5420,6 @@ light or a window shade. - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -6964,10 +5432,6 @@ light or a window shade. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6980,10 +5444,6 @@ light or a window shade. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -6996,10 +5456,6 @@ light or a window shade. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7012,10 +5468,6 @@ light or a window shade. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7028,10 +5480,6 @@ light or a window shade. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7067,10 +5515,6 @@ light or a window shade. - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7083,10 +5527,6 @@ light or a window shade. - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7099,10 +5539,6 @@ light or a window shade. - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7115,10 +5551,6 @@ light or a window shade. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7131,10 +5563,6 @@ light or a window shade. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7147,10 +5575,6 @@ light or a window shade. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7163,10 +5587,6 @@ light or a window shade. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7179,10 +5599,6 @@ light or a window shade. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7235,10 +5651,6 @@ light or a window shade. - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7252,10 +5664,6 @@ light or a window shade. - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7268,10 +5676,6 @@ light or a window shade. - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7284,10 +5688,6 @@ light or a window shade. - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -7300,10 +5700,6 @@ light or a window shade. - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7316,10 +5712,6 @@ light or a window shade. - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -7332,10 +5724,6 @@ light or a window shade. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7348,10 +5736,6 @@ light or a window shade. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7364,10 +5748,6 @@ light or a window shade. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7380,10 +5760,6 @@ light or a window shade. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7396,10 +5772,6 @@ light or a window shade. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7443,10 +5815,6 @@ light or a window shade. - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7460,10 +5828,6 @@ light or a window shade. - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7476,10 +5840,6 @@ light or a window shade. - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -7492,10 +5852,6 @@ light or a window shade. - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -7508,10 +5864,6 @@ light or a window shade. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7524,10 +5876,6 @@ light or a window shade. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7540,10 +5888,6 @@ light or a window shade. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7556,10 +5900,6 @@ light or a window shade. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7572,10 +5912,6 @@ light or a window shade. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7604,10 +5940,6 @@ labels. - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7620,10 +5952,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7636,10 +5964,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7652,10 +5976,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7668,10 +5988,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7684,10 +6000,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7719,10 +6031,6 @@ labels. - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7735,10 +6043,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7751,10 +6055,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7767,10 +6067,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7783,10 +6079,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7799,10 +6091,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7830,10 +6118,6 @@ labels. - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7846,10 +6130,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7862,10 +6142,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -7878,10 +6154,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7894,10 +6166,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7910,10 +6178,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7944,10 +6208,6 @@ labels. - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -7960,10 +6220,6 @@ labels. - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -7976,10 +6232,6 @@ labels. - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -7992,10 +6244,6 @@ labels. - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8013,10 +6261,6 @@ labels. - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8033,10 +6277,6 @@ labels. - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8049,10 +6289,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -8065,10 +6301,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -8081,10 +6313,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -8097,10 +6325,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8113,10 +6337,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8186,10 +6406,6 @@ labels. - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8202,10 +6418,6 @@ labels. - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8218,10 +6430,6 @@ labels. - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8234,10 +6442,6 @@ labels. - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8255,10 +6459,6 @@ labels. - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8276,10 +6476,6 @@ labels. - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8296,10 +6492,6 @@ labels. - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8312,10 +6504,6 @@ labels. - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8328,10 +6516,6 @@ labels. - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8344,10 +6528,6 @@ labels. - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8360,10 +6540,6 @@ labels. - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8380,10 +6556,6 @@ labels. - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8400,10 +6572,6 @@ labels. - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8419,10 +6587,6 @@ labels. - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8435,10 +6599,6 @@ labels. - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8451,10 +6611,6 @@ labels. - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8467,10 +6623,6 @@ labels. - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8483,10 +6635,6 @@ labels. - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8499,10 +6647,6 @@ labels. - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8522,10 +6666,6 @@ labels. - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -8543,10 +6683,6 @@ labels. - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8564,10 +6700,6 @@ labels. - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8585,10 +6717,6 @@ labels. - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8606,10 +6734,6 @@ labels. - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8622,10 +6746,6 @@ labels. - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8638,10 +6758,6 @@ labels. - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8660,10 +6776,6 @@ labels. - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8681,10 +6793,6 @@ labels. - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8702,10 +6810,6 @@ labels. - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8723,10 +6827,6 @@ labels. - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8744,10 +6844,6 @@ labels. - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8765,10 +6861,6 @@ labels. - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8786,10 +6878,6 @@ labels. - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8808,10 +6896,6 @@ labels. - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8829,10 +6913,6 @@ labels. - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8851,10 +6931,6 @@ labels. - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -8867,10 +6943,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -8883,10 +6955,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -8899,10 +6967,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -8915,10 +6979,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8931,10 +6991,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8980,10 +7036,6 @@ labels. - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -8996,10 +7048,6 @@ labels. - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9012,10 +7060,6 @@ labels. - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9028,10 +7072,6 @@ labels. - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9044,10 +7084,6 @@ labels. - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9060,10 +7096,6 @@ labels. - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9076,10 +7108,6 @@ labels. - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9092,10 +7120,6 @@ labels. - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9108,10 +7132,6 @@ labels. - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9125,10 +7145,6 @@ labels. - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9142,10 +7158,6 @@ labels. - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9158,10 +7170,6 @@ labels. - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9177,10 +7185,6 @@ labels. - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9196,10 +7200,6 @@ labels. - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9212,10 +7212,6 @@ labels. - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9231,10 +7227,6 @@ labels. - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9250,10 +7242,6 @@ labels. - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9266,10 +7254,6 @@ labels. - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9282,10 +7266,6 @@ labels. - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9298,10 +7278,6 @@ labels. - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9318,10 +7294,6 @@ labels. - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9334,10 +7306,6 @@ labels. - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9350,10 +7318,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -9366,10 +7330,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -9382,10 +7342,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -9398,10 +7354,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9414,10 +7366,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9451,10 +7399,6 @@ labels. - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9467,10 +7411,6 @@ labels. - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9483,10 +7423,6 @@ labels. - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9504,10 +7440,6 @@ labels. - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9525,10 +7457,6 @@ labels. - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9546,10 +7474,6 @@ labels. - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9567,10 +7491,6 @@ labels. - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9588,10 +7508,6 @@ labels. - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9609,10 +7525,6 @@ labels. - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9625,10 +7537,6 @@ labels. - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9641,10 +7549,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -9657,10 +7561,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -9673,10 +7573,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -9689,10 +7585,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9705,10 +7597,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9736,10 +7624,6 @@ labels. - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9752,10 +7636,6 @@ labels. - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9768,10 +7648,6 @@ labels. - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9784,10 +7660,6 @@ labels. - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9800,10 +7672,6 @@ labels. - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9816,10 +7684,6 @@ labels. - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9832,10 +7696,6 @@ labels. - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9848,10 +7708,6 @@ labels. - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9864,10 +7720,6 @@ labels. - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9880,10 +7732,6 @@ labels. - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9896,10 +7744,6 @@ labels. - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9912,10 +7756,6 @@ labels. - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9928,10 +7768,6 @@ labels. - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9944,10 +7780,6 @@ labels. - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9960,10 +7792,6 @@ labels. - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9976,10 +7804,6 @@ labels. - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -9992,10 +7816,6 @@ labels. - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10008,10 +7828,6 @@ labels. - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10029,10 +7845,6 @@ labels. - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10045,10 +7857,6 @@ labels. - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10066,10 +7874,6 @@ labels. - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10087,10 +7891,6 @@ labels. - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10108,10 +7908,6 @@ labels. - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10124,10 +7920,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -10140,10 +7932,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -10156,10 +7944,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -10172,10 +7956,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10188,10 +7968,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10230,10 +8006,6 @@ labels. - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10246,10 +8018,6 @@ labels. - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10262,10 +8030,6 @@ labels. - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10278,10 +8042,6 @@ labels. - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10294,10 +8054,6 @@ labels. - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10310,10 +8066,6 @@ labels. - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10326,10 +8078,6 @@ labels. - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10342,10 +8090,6 @@ labels. - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10358,10 +8102,6 @@ labels. - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10379,10 +8119,6 @@ labels. - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10400,10 +8136,6 @@ labels. - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10421,10 +8153,6 @@ labels. - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10442,10 +8170,6 @@ labels. - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10463,10 +8187,6 @@ labels. - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10484,10 +8204,6 @@ labels. - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10505,10 +8221,6 @@ labels. - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10526,10 +8238,6 @@ labels. - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10547,10 +8255,6 @@ labels. - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10568,10 +8272,6 @@ labels. - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10589,10 +8289,6 @@ labels. - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10610,10 +8306,6 @@ labels. - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10631,10 +8323,6 @@ labels. - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10651,10 +8339,6 @@ labels. - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10667,10 +8351,6 @@ labels. - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10683,10 +8363,6 @@ labels. - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10699,10 +8375,6 @@ labels. - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10715,10 +8387,6 @@ labels. - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10736,10 +8404,6 @@ labels. - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10757,10 +8421,6 @@ labels. - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10781,10 +8441,6 @@ labels. - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10800,10 +8456,6 @@ labels. - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10816,10 +8468,6 @@ labels. - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10832,10 +8480,6 @@ labels. - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10848,10 +8492,6 @@ labels. - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10870,10 +8510,6 @@ labels. - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10886,10 +8522,6 @@ labels. - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10902,10 +8534,6 @@ labels. - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10923,10 +8551,6 @@ labels. - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -10939,10 +8563,6 @@ labels. - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10955,10 +8575,6 @@ labels. - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10976,10 +8592,6 @@ labels. - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -10996,10 +8608,6 @@ labels. - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11016,10 +8624,6 @@ labels. - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11037,10 +8641,6 @@ labels. - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11058,10 +8658,6 @@ labels. - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11079,10 +8675,6 @@ labels. - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11100,10 +8692,6 @@ labels. - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11116,10 +8704,6 @@ labels. - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11137,10 +8721,6 @@ labels. - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11153,10 +8733,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11169,10 +8745,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11185,10 +8757,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -11201,10 +8769,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11217,10 +8781,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11252,10 +8812,6 @@ labels. - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11273,10 +8829,6 @@ labels. - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11294,10 +8846,6 @@ labels. - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11310,10 +8858,6 @@ labels. - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11326,10 +8870,6 @@ labels. - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11347,10 +8887,6 @@ labels. - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11363,10 +8899,6 @@ labels. - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11379,10 +8911,6 @@ labels. - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11400,10 +8928,6 @@ labels. - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11416,10 +8940,6 @@ labels. - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11437,10 +8957,6 @@ labels. - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11453,10 +8969,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11469,10 +8981,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11485,10 +8993,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -11501,10 +9005,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11517,10 +9017,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11553,10 +9049,6 @@ labels. - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -11574,10 +9066,6 @@ labels. - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11595,10 +9083,6 @@ labels. - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11612,10 +9096,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11628,10 +9108,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -11644,10 +9120,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -11660,10 +9132,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11676,10 +9144,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11746,10 +9210,6 @@ labels. - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11762,10 +9222,6 @@ labels. - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11778,10 +9234,6 @@ labels. - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11794,10 +9246,6 @@ labels. - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11810,10 +9258,6 @@ labels. - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11826,10 +9270,6 @@ labels. - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11842,10 +9282,6 @@ labels. - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -11858,10 +9294,6 @@ labels. - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -11874,10 +9306,6 @@ labels. - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11894,10 +9322,6 @@ labels. - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11910,10 +9334,6 @@ labels. - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11926,10 +9346,6 @@ labels. - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11942,10 +9358,6 @@ labels. - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11958,10 +9370,6 @@ labels. - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11974,10 +9382,6 @@ labels. - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11990,10 +9394,6 @@ labels. - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12006,10 +9406,6 @@ labels. - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12022,10 +9418,6 @@ labels. - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12038,10 +9430,6 @@ labels. - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12054,10 +9442,6 @@ labels. - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12070,10 +9454,6 @@ labels. - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12086,10 +9466,6 @@ labels. - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12102,10 +9478,6 @@ labels. - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12118,10 +9490,6 @@ labels. - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12134,10 +9502,6 @@ labels. - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12150,10 +9514,6 @@ labels. - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12166,10 +9526,6 @@ labels. - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12182,10 +9538,6 @@ labels. - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12198,10 +9550,6 @@ labels. - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12219,10 +9567,6 @@ labels. - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12240,10 +9584,6 @@ labels. - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12261,10 +9601,6 @@ labels. - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12282,10 +9618,6 @@ labels. - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12303,10 +9635,6 @@ labels. - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12324,10 +9652,6 @@ labels. - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12345,10 +9669,6 @@ labels. - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12366,10 +9686,6 @@ labels. - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12387,10 +9703,6 @@ labels. - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12408,10 +9720,6 @@ labels. - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12429,10 +9737,6 @@ labels. - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12445,10 +9749,6 @@ labels. - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12461,10 +9761,6 @@ labels. - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12477,10 +9773,6 @@ labels. - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12493,10 +9785,6 @@ labels. - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12509,10 +9797,6 @@ labels. - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12525,10 +9809,6 @@ labels. - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12541,10 +9821,6 @@ labels. - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12557,10 +9833,6 @@ labels. - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12573,10 +9845,6 @@ labels. - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12589,10 +9857,6 @@ labels. - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12605,10 +9869,6 @@ labels. - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12629,10 +9889,6 @@ labels. - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12646,10 +9902,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -12662,10 +9914,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -12678,10 +9926,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -12694,10 +9938,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12710,10 +9950,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12741,10 +9977,6 @@ labels. - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12757,10 +9989,6 @@ labels. - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12773,10 +10001,6 @@ labels. - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12793,10 +10017,6 @@ labels. - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12813,10 +10033,6 @@ labels. - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12834,10 +10050,6 @@ labels. - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12855,10 +10067,6 @@ labels. - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -12871,10 +10079,6 @@ labels. - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12891,10 +10095,6 @@ labels. - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -12912,10 +10112,6 @@ labels. - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -12933,10 +10129,6 @@ labels. - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12954,10 +10146,6 @@ labels. - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12975,10 +10163,6 @@ labels. - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -12996,10 +10180,6 @@ labels. - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -13012,10 +10192,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13028,10 +10204,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13044,10 +10216,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13060,10 +10228,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13076,10 +10240,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13107,10 +10267,6 @@ labels. - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13123,10 +10279,6 @@ labels. - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13139,10 +10291,6 @@ labels. - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13155,10 +10303,6 @@ labels. - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13171,10 +10315,6 @@ labels. - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13187,10 +10327,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13203,10 +10339,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13219,10 +10351,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13235,10 +10363,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13251,10 +10375,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13282,10 +10402,6 @@ labels. - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13298,10 +10414,6 @@ labels. - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13314,10 +10426,6 @@ labels. - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13330,10 +10438,6 @@ labels. - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13346,10 +10450,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13362,10 +10462,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13378,10 +10474,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13394,10 +10486,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13410,10 +10498,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13441,10 +10525,6 @@ labels. - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13457,10 +10537,6 @@ labels. - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13473,10 +10549,6 @@ labels. - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13489,10 +10561,6 @@ labels. - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13505,10 +10573,6 @@ labels. - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13521,10 +10585,6 @@ labels. - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13537,10 +10597,6 @@ labels. - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13553,10 +10609,6 @@ labels. - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13569,10 +10621,6 @@ labels. - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13585,10 +10633,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13601,10 +10645,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13617,10 +10657,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13633,10 +10669,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13649,10 +10681,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13680,10 +10708,6 @@ labels. - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13696,10 +10720,6 @@ labels. - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13712,10 +10732,6 @@ labels. - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13728,10 +10744,6 @@ labels. - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13744,10 +10756,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13760,10 +10768,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13776,10 +10780,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13792,10 +10792,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13808,10 +10804,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13839,10 +10831,6 @@ labels. - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13855,10 +10843,6 @@ labels. - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13871,10 +10855,6 @@ labels. - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13887,10 +10867,6 @@ labels. - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13903,10 +10879,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13919,10 +10891,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -13935,10 +10903,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -13951,10 +10915,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13967,10 +10927,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -13998,10 +10954,6 @@ labels. - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14014,10 +10966,6 @@ labels. - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -14030,10 +10978,6 @@ labels. - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -14051,10 +10995,6 @@ labels. - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14073,10 +11013,6 @@ labels. - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14095,10 +11031,6 @@ labels. - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14119,10 +11051,6 @@ labels. - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14143,10 +11071,6 @@ labels. - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14167,10 +11091,6 @@ labels. - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14191,10 +11111,6 @@ labels. - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14216,10 +11132,6 @@ labels. - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14241,10 +11153,6 @@ labels. - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14261,10 +11169,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14277,10 +11181,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14293,10 +11193,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14309,10 +11205,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14325,10 +11217,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14356,10 +11244,6 @@ labels. - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -14372,10 +11256,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14388,10 +11268,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14404,10 +11280,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14420,10 +11292,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14436,10 +11304,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14475,10 +11339,6 @@ labels. - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14491,10 +11351,6 @@ labels. - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, @@ -14507,10 +11363,6 @@ labels. - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, @@ -14523,10 +11375,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14539,10 +11387,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14555,10 +11399,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14571,10 +11411,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14587,10 +11423,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14622,10 +11454,6 @@ labels. - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14638,10 +11466,6 @@ labels. - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14654,10 +11478,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14670,10 +11490,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14686,10 +11502,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14702,10 +11514,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14718,10 +11526,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14800,10 +11604,6 @@ labels. - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14816,10 +11616,6 @@ labels. - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14832,10 +11628,6 @@ labels. - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14848,10 +11640,6 @@ labels. - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, @@ -14864,10 +11652,6 @@ labels. - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14880,10 +11664,6 @@ labels. - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14896,10 +11676,6 @@ labels. - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14912,10 +11688,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14928,10 +11700,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -14944,10 +11712,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -14960,10 +11724,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -14976,10 +11736,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15018,10 +11774,6 @@ labels. - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15034,10 +11786,6 @@ labels. - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15050,10 +11798,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15066,10 +11810,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15082,10 +11822,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15098,10 +11834,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15114,10 +11846,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15149,10 +11877,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15165,10 +11889,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15181,10 +11901,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15197,10 +11913,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15213,10 +11925,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15248,10 +11956,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15264,10 +11968,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15280,10 +11980,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15296,10 +11992,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15312,10 +12004,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15350,10 +12038,6 @@ labels. - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15371,10 +12055,6 @@ labels. - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -15387,10 +12067,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15403,10 +12079,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15419,10 +12091,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15435,10 +12103,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15451,10 +12115,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15487,10 +12147,6 @@ labels. - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15503,10 +12159,6 @@ labels. - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15519,10 +12171,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15535,10 +12183,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15551,10 +12195,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15567,10 +12207,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15583,10 +12219,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15624,10 +12256,6 @@ labels. - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15645,10 +12273,6 @@ labels. - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, @@ -15661,10 +12285,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15677,10 +12297,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15693,10 +12309,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15709,10 +12321,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15725,10 +12333,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15757,10 +12361,6 @@ labels. - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -15773,10 +12373,6 @@ labels. - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15789,10 +12385,6 @@ labels. - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -15805,10 +12397,6 @@ labels. - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15821,10 +12409,6 @@ labels. - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, @@ -15838,10 +12422,6 @@ labels. - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15854,10 +12434,6 @@ labels. - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -15870,10 +12446,6 @@ labels. - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15886,10 +12458,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15902,10 +12470,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -15918,10 +12482,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -15934,10 +12494,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15950,10 +12506,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -15991,10 +12543,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -16007,10 +12555,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -16023,10 +12567,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -16039,10 +12579,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16055,10 +12591,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16093,10 +12625,6 @@ labels. - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16109,10 +12637,6 @@ labels. - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16125,10 +12649,6 @@ labels. - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16141,10 +12661,6 @@ labels. - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16157,10 +12673,6 @@ labels. - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16173,10 +12685,6 @@ labels. - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16189,10 +12697,6 @@ labels. - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16205,10 +12709,6 @@ labels. - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16221,10 +12721,6 @@ labels. - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16237,10 +12733,6 @@ labels. - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16253,10 +12745,6 @@ labels. - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16269,10 +12757,6 @@ labels. - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16285,10 +12769,6 @@ labels. - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16301,10 +12781,6 @@ labels. - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16317,10 +12793,6 @@ labels. - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16333,10 +12805,6 @@ labels. - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16349,10 +12817,6 @@ labels. - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16365,10 +12829,6 @@ labels. - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16381,10 +12841,6 @@ labels. - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16397,10 +12853,6 @@ labels. - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16413,10 +12865,6 @@ labels. - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16429,10 +12877,6 @@ labels. - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16445,10 +12889,6 @@ labels. - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16461,10 +12901,6 @@ labels. - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16477,10 +12913,6 @@ labels. - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16493,10 +12925,6 @@ labels. - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16509,10 +12937,6 @@ labels. - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16525,10 +12949,6 @@ labels. - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16541,10 +12961,6 @@ labels. - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16557,10 +12973,6 @@ labels. - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16576,10 +12988,6 @@ labels. - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16595,10 +13003,6 @@ labels. - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16614,10 +13018,6 @@ labels. - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16633,10 +13033,6 @@ labels. - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16652,10 +13048,6 @@ labels. - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16671,10 +13063,6 @@ labels. - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16687,10 +13075,6 @@ labels. - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16703,10 +13087,6 @@ labels. - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16719,10 +13099,6 @@ labels. - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16735,10 +13111,6 @@ labels. - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16751,10 +13123,6 @@ labels. - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16768,10 +13136,6 @@ labels. - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16784,10 +13148,6 @@ labels. - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16800,10 +13160,6 @@ labels. - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16816,10 +13172,6 @@ labels. - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16833,10 +13185,6 @@ labels. - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -16849,10 +13197,6 @@ labels. - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16865,10 +13209,6 @@ labels. - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16881,10 +13221,6 @@ labels. - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16897,10 +13233,6 @@ labels. - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16913,10 +13245,6 @@ labels. - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16929,10 +13257,6 @@ labels. - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16945,10 +13269,6 @@ labels. - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16961,10 +13281,6 @@ labels. - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16977,10 +13293,6 @@ labels. - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16993,10 +13305,6 @@ labels. - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17009,10 +13317,6 @@ labels. - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17025,10 +13329,6 @@ labels. - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17046,10 +13346,6 @@ labels. - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17070,10 +13366,6 @@ labels. - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17092,10 +13384,6 @@ labels. - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17113,10 +13401,6 @@ labels. - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17135,10 +13419,6 @@ labels. - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17156,10 +13436,6 @@ labels. - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17172,10 +13448,6 @@ labels. - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17188,10 +13460,6 @@ labels. - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17204,10 +13472,6 @@ labels. - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17220,10 +13484,6 @@ labels. - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17236,10 +13496,6 @@ labels. - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17252,10 +13508,6 @@ labels. - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17273,10 +13525,6 @@ labels. - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17289,10 +13537,6 @@ labels. - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17305,10 +13549,6 @@ labels. - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17326,10 +13566,6 @@ labels. - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17342,10 +13578,6 @@ labels. - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17358,10 +13590,6 @@ labels. - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17374,10 +13602,6 @@ labels. - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17390,10 +13614,6 @@ labels. - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17406,10 +13626,6 @@ labels. - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17422,10 +13638,6 @@ labels. - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17438,10 +13650,6 @@ labels. - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17454,10 +13662,6 @@ labels. - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17470,10 +13674,6 @@ labels. - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17486,10 +13686,6 @@ labels. - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17502,10 +13698,6 @@ labels. - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17518,10 +13710,6 @@ labels. - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17534,10 +13722,6 @@ labels. - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17550,10 +13734,6 @@ labels. - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17566,10 +13746,6 @@ labels. - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17582,10 +13758,6 @@ labels. - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17598,10 +13770,6 @@ labels. - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17614,10 +13782,6 @@ labels. - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17630,10 +13794,6 @@ labels. - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17646,10 +13806,6 @@ labels. - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17662,10 +13818,6 @@ labels. - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17678,10 +13830,6 @@ labels. - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17694,10 +13842,6 @@ labels. - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17710,10 +13854,6 @@ labels. - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17726,10 +13866,6 @@ labels. - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17742,10 +13878,6 @@ labels. - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17762,10 +13894,6 @@ labels. - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17781,10 +13909,6 @@ labels. - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17800,10 +13924,6 @@ labels. - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17819,10 +13939,6 @@ labels. - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17838,10 +13954,6 @@ labels. - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17854,10 +13966,6 @@ labels. - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17870,10 +13978,6 @@ labels. - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17886,10 +13990,6 @@ labels. - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17902,10 +14002,6 @@ labels. - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17918,10 +14014,6 @@ labels. - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17934,10 +14026,6 @@ labels. - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17950,10 +14038,6 @@ labels. - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17966,10 +14050,6 @@ labels. - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17982,10 +14062,6 @@ labels. - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -17998,10 +14074,6 @@ labels. - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18014,10 +14086,6 @@ labels. - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18030,10 +14098,6 @@ labels. - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18046,10 +14110,6 @@ labels. - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18062,10 +14122,6 @@ labels. - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18078,10 +14134,6 @@ labels. - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18094,10 +14146,6 @@ labels. - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18110,10 +14158,6 @@ labels. - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18130,10 +14174,6 @@ labels. - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18149,10 +14189,6 @@ labels. - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18168,10 +14204,6 @@ labels. - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18187,10 +14219,6 @@ labels. - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18206,10 +14234,6 @@ labels. - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18222,10 +14246,6 @@ labels. - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -18238,10 +14258,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -18254,10 +14270,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -18270,10 +14282,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -18286,10 +14294,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18302,10 +14306,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18412,10 +14412,6 @@ labels. - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18432,10 +14428,6 @@ labels. - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18452,10 +14444,6 @@ labels. - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18472,10 +14460,6 @@ labels. - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18492,10 +14476,6 @@ labels. - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18512,10 +14492,6 @@ labels. - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18532,10 +14508,6 @@ labels. - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18552,10 +14524,6 @@ labels. - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18572,10 +14540,6 @@ labels. - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18592,10 +14556,6 @@ labels. - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18612,10 +14572,6 @@ labels. - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18632,10 +14588,6 @@ labels. - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18652,10 +14604,6 @@ labels. - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18672,10 +14620,6 @@ labels. - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18692,10 +14636,6 @@ labels. - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18712,10 +14652,6 @@ labels. - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18732,10 +14668,6 @@ labels. - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18752,10 +14684,6 @@ labels. - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18772,10 +14700,6 @@ labels. - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18792,10 +14716,6 @@ labels. - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18812,10 +14732,6 @@ labels. - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18832,10 +14748,6 @@ labels. - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18852,10 +14764,6 @@ labels. - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18873,10 +14781,6 @@ labels. - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18894,10 +14798,6 @@ labels. - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18914,10 +14814,6 @@ labels. - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -18934,10 +14830,6 @@ labels. - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -18955,10 +14847,6 @@ labels. - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -18976,10 +14864,6 @@ labels. - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -18997,10 +14881,6 @@ labels. - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -19017,10 +14897,6 @@ labels. - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -19038,10 +14914,6 @@ labels. - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler @@ -19058,10 +14930,6 @@ labels. - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19078,10 +14946,6 @@ labels. - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19098,10 +14962,6 @@ labels. - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19119,10 +14979,6 @@ labels. - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -19142,10 +14998,6 @@ labels. - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19163,10 +15015,6 @@ labels. - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, @@ -19184,10 +15032,6 @@ labels. - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19205,10 +15049,6 @@ labels. - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19226,10 +15066,6 @@ labels. - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19247,10 +15083,6 @@ labels. - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19268,10 +15100,6 @@ labels. - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -19290,10 +15118,6 @@ labels. - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -19311,10 +15135,6 @@ labels. - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19332,10 +15152,6 @@ labels. - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19353,10 +15169,6 @@ labels. - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19374,10 +15186,6 @@ labels. - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19395,10 +15203,6 @@ labels. - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19416,10 +15220,6 @@ labels. - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19437,10 +15237,6 @@ labels. - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19458,10 +15254,6 @@ labels. - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19479,10 +15271,6 @@ labels. - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19500,10 +15288,6 @@ labels. - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19521,10 +15305,6 @@ labels. - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19542,10 +15322,6 @@ labels. - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19563,10 +15339,6 @@ labels. - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19584,10 +15356,6 @@ labels. - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19605,10 +15373,6 @@ labels. - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19626,10 +15390,6 @@ labels. - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19647,10 +15407,6 @@ labels. - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19668,10 +15424,6 @@ labels. - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19689,10 +15441,6 @@ labels. - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19710,10 +15458,6 @@ labels. - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19731,10 +15475,6 @@ labels. - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19752,10 +15492,6 @@ labels. - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19773,10 +15509,6 @@ labels. - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19794,10 +15526,6 @@ labels. - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19815,10 +15543,6 @@ labels. - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19836,10 +15560,6 @@ labels. - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19857,10 +15577,6 @@ labels. - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19878,10 +15594,6 @@ labels. - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19899,10 +15611,6 @@ labels. - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, @@ -19920,10 +15628,6 @@ labels. - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler @@ -19941,10 +15645,6 @@ labels. - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, @@ -19962,10 +15662,6 @@ labels. - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19983,10 +15679,6 @@ labels. - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, @@ -20004,10 +15696,6 @@ labels. - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -20026,10 +15714,6 @@ labels. - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -20048,10 +15732,6 @@ labels. - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -20070,10 +15750,6 @@ labels. - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params subscriptionEstablished: (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -20092,10 +15768,6 @@ labels. - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -20108,10 +15780,6 @@ labels. - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -20124,10 +15792,6 @@ labels. - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, @@ -20140,10 +15804,6 @@ labels. - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -20156,10 +15816,6 @@ labels. - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -20172,10 +15828,6 @@ labels. - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -/** - * This API does not support setting resubscribeIfLost to NO in the - * MTRSubscribeParams. - */ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index ba602ab44f2664..9f1d3b566fa8aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -18,6 +18,7 @@ #import #import "MTRAttributeCacheContainer_Internal.h" +#import "MTRBaseClustersCpp_Internal.h" #import "MTRBaseClusters_internal.h" #import "MTRBaseDevice.h" #import "MTRBaseDevice_Internal.h" @@ -26,7 +27,6 @@ #import "MTRCommandPayloadsObjc.h" #import "MTRStructsObjc.h" -#include #include #include #include @@ -112,14 +112,10 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -163,33 +159,10 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -218,47 +191,20 @@ + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -287,15 +233,10 @@ + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IdentifyGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -303,35 +244,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IdentifyGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -362,15 +278,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IdentifyAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -378,35 +289,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IdentifyAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -437,48 +323,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, IdentifyAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, IdentifyAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -507,47 +365,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -576,47 +407,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1115,47 +919,20 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1184,14 +961,10 @@ + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1199,34 +972,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1257,14 +1006,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1272,34 +1017,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1329,48 +1050,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1399,47 +1092,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -1468,47 +1134,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2235,47 +1874,20 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2304,47 +1916,20 @@ + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2373,47 +1958,20 @@ + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2442,47 +2000,20 @@ + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2511,47 +2042,20 @@ + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2580,47 +2084,20 @@ + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2649,14 +2126,10 @@ + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2664,34 +2137,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2722,14 +2171,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2737,34 +2182,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2794,48 +2215,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2864,47 +2257,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -2933,47 +2299,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -3644,47 +2983,20 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -3713,14 +3025,10 @@ + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3728,33 +3036,10 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -3784,14 +3069,10 @@ + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3835,33 +3116,10 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -3890,14 +3148,10 @@ + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3941,33 +3195,10 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -3996,15 +3227,10 @@ + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableOnOffClusterOnOffStartUpOnOffAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -4053,35 +3279,10 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableOnOffClusterOnOffStartUpOnOffAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4111,14 +3312,10 @@ + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4126,34 +3323,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4183,14 +3356,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OnOffAcceptedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4198,34 +3367,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OnOffAcceptedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4255,47 +3400,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OnOffAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OnOffAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4324,47 +3442,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4393,47 +3484,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4898,47 +3962,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -4967,14 +4004,10 @@ + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -5018,33 +4051,10 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -5073,15 +4083,11 @@ + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5089,36 +4095,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -5149,15 +4129,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5165,36 +4141,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -5225,51 +4175,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OnOffSwitchConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -5299,47 +4218,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -5368,47 +4260,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6012,47 +4877,20 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6081,47 +4919,20 @@ + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6150,47 +4961,20 @@ + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6219,47 +5003,20 @@ + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6288,47 +5045,20 @@ + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6357,47 +5087,20 @@ + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6426,47 +5129,20 @@ + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6495,14 +5171,10 @@ + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6546,33 +5218,10 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6601,14 +5250,10 @@ + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6653,33 +5298,10 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6709,14 +5331,10 @@ + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6765,33 +5383,10 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6820,14 +5415,10 @@ + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6876,33 +5467,10 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -6931,14 +5499,10 @@ + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6987,33 +5551,10 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7042,14 +5583,10 @@ + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -7098,33 +5635,10 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7153,14 +5667,10 @@ + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -7210,33 +5720,10 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7266,15 +5753,10 @@ + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -7282,35 +5764,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7341,15 +5798,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -7357,35 +5809,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7416,48 +5843,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LevelControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7486,47 +5885,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -7555,47 +5927,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8420,14 +6765,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8471,33 +6812,10 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8526,14 +6844,10 @@ + (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8577,33 +6891,10 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8632,14 +6923,10 @@ + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8683,33 +6970,10 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8738,14 +7002,10 @@ + (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8789,33 +7049,10 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8844,47 +7081,20 @@ + (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -8913,14 +7123,10 @@ + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8964,33 +7170,10 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9019,14 +7202,10 @@ + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -9070,33 +7249,10 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9125,47 +7281,20 @@ + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9194,47 +7323,20 @@ + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9263,15 +7365,10 @@ + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9279,36 +7376,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9339,15 +7410,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9355,36 +7421,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9415,50 +7455,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BinaryInputBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9488,47 +7498,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -9557,47 +7540,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10191,48 +8147,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorDeviceTypeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorDeviceTypeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDeviceTypeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10261,48 +8189,20 @@ + (void)readAttributeDeviceTypeListWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorServerListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorServerListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10331,48 +8231,20 @@ + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorClientListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorClientListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10401,48 +8273,20 @@ + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorPartsListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorPartsListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10471,15 +8315,10 @@ + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DescriptorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10487,35 +8326,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DescriptorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10546,15 +8360,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DescriptorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10562,35 +8371,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DescriptorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10621,48 +8405,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DescriptorAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10691,47 +8447,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -10760,47 +8489,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11163,14 +8865,9 @@ - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BindingBindingListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11251,33 +8948,10 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBindingBindingListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BindingBindingListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11306,15 +8980,10 @@ + (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BindingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11322,35 +8991,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BindingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11381,14 +9025,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BindingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11396,34 +9036,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BindingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11454,48 +9070,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BindingAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BindingAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11524,47 +9112,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11593,47 +9154,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -11907,14 +9441,9 @@ - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AccessControlAclListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -12056,33 +9585,10 @@ - (void)subscribeAttributeAclWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AccessControlAclListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12113,14 +9619,9 @@ - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AccessControlExtensionListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -12186,34 +9687,10 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AccessControlExtensionListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12243,14 +9720,10 @@ + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12259,33 +9732,10 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12316,14 +9766,10 @@ + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttribu - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12332,33 +9778,10 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12389,14 +9812,10 @@ + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttribut - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12405,33 +9824,10 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12461,15 +9857,10 @@ + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttribu - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12477,35 +9868,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12536,15 +9902,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12552,35 +9913,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12611,48 +9947,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccessControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12682,47 +9990,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -12751,47 +10032,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13593,47 +10847,20 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsActionListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRActionsActionListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsActionListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13662,48 +10889,20 @@ + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsEndpointListsListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsEndpointListsListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13732,47 +10931,20 @@ + (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13801,15 +10973,10 @@ + (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ActionsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13817,35 +10984,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ActionsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13876,14 +11018,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ActionsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13891,34 +11029,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ActionsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -13949,48 +11063,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRActionsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ActionsAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14019,47 +11105,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14088,47 +11147,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14546,47 +11578,20 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14615,47 +11620,20 @@ + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14684,47 +11662,20 @@ + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14753,47 +11704,20 @@ + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14822,47 +11746,20 @@ + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14891,14 +11788,10 @@ + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14942,33 +11835,10 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -14997,14 +11867,10 @@ + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::Location::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::Location::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -15048,33 +11914,10 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::Location::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::Location::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15103,47 +11946,20 @@ + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15172,14 +11988,10 @@ + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15187,33 +11999,10 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15243,47 +12032,20 @@ + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15312,14 +12074,10 @@ + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15327,33 +12085,10 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15383,47 +12118,20 @@ + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15452,47 +12160,20 @@ + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15521,47 +12202,20 @@ + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15590,47 +12244,20 @@ + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15659,47 +12286,20 @@ + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15728,14 +12328,10 @@ + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -15780,33 +12376,10 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15836,47 +12409,20 @@ + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15905,47 +12451,20 @@ + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -15975,14 +12494,11 @@ + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicCapabilityMinimaStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15990,34 +12506,10 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicCapabilityMinimaStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -16047,14 +12539,10 @@ + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16062,34 +12550,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -16119,14 +12583,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicAcceptedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16134,34 +12594,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicAcceptedCommandListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -16191,47 +12627,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BasicAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -16260,47 +12669,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -16329,47 +12711,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -17447,15 +13802,11 @@ - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotify - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17463,36 +13814,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -17523,15 +13848,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17539,36 +13860,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -17599,51 +13894,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateProviderAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -17673,47 +13937,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -17742,47 +13979,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18067,15 +14277,10 @@ - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)pa completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18143,36 +14348,10 @@ - (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18203,47 +14382,20 @@ + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18272,53 +14424,21 @@ + (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18348,14 +14468,10 @@ + (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18363,33 +14479,10 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18419,15 +14512,11 @@ + (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18435,36 +14524,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18495,15 +14558,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18511,36 +14570,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18571,51 +14604,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OtaSoftwareUpdateRequestorAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18645,47 +14648,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -18714,47 +14690,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19141,14 +15090,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -19192,33 +15137,10 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19247,51 +15169,21 @@ + (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationSupportedLocalesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationSupportedLocalesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19321,15 +15213,11 @@ + (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19337,36 +15225,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19397,15 +15259,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19413,36 +15271,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19473,51 +15305,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LocalizationConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19547,47 +15348,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19616,47 +15390,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -19964,15 +15711,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationClusterHourFormatAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -20016,36 +15758,10 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationClusterHourFormatAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20075,15 +15791,10 @@ + (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationClusterCalendarTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -20128,36 +15839,10 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationClusterCalendarTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20188,15 +15873,11 @@ + (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20204,36 +15885,10 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20264,15 +15919,11 @@ + (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20280,36 +15931,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20340,15 +15965,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20356,36 +15977,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20416,51 +16011,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeFormatLocalizationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20490,47 +16054,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20559,47 +16096,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -20954,15 +16464,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationClusterTempUnitAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -21006,35 +16511,10 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationClusterTempUnitAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21064,15 +16544,10 @@ + (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21080,36 +16555,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21140,15 +16589,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21156,36 +16600,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21216,50 +16634,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitLocalizationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21289,47 +16677,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21358,47 +16719,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21672,50 +17006,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationSourcesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationSourcesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21745,15 +17049,11 @@ + (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21761,36 +17061,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21821,15 +17095,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21837,36 +17107,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21897,51 +17141,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -21971,47 +17184,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22040,47 +17226,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22341,50 +17500,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterPowerSourceStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterPowerSourceStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22414,47 +17543,20 @@ + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22483,47 +17585,20 @@ + (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22553,14 +17628,10 @@ + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22568,33 +17639,10 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22625,14 +17673,10 @@ + (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCa - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22640,33 +17684,10 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22696,50 +17717,20 @@ + (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttribute - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterWiredCurrentTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterWiredCurrentTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22769,14 +17760,10 @@ + (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22784,33 +17771,10 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22840,14 +17804,10 @@ + (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22855,33 +17815,10 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22911,14 +17848,10 @@ + (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22926,33 +17859,10 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -22982,47 +17892,20 @@ + (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23051,50 +17934,20 @@ + (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveWiredFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveWiredFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23124,47 +17977,20 @@ + (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23193,14 +18019,10 @@ + (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23208,33 +18030,10 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23264,47 +18063,20 @@ + (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23333,50 +18105,20 @@ + (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatChargeLevelAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatChargeLevelAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23406,14 +18148,10 @@ + (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23421,33 +18159,10 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23477,50 +18192,20 @@ + (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatReplaceabilityAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatReplaceabilityAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23550,47 +18235,20 @@ + (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23619,48 +18277,20 @@ + (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveBatFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveBatFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23691,14 +18321,10 @@ + (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23706,33 +18332,10 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23762,14 +18365,10 @@ + (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCa - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23777,33 +18376,10 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23833,14 +18409,10 @@ + (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23848,33 +18420,10 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23904,47 +18453,20 @@ + (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -23973,14 +18495,10 @@ + (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -23988,33 +18506,10 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24044,47 +18539,20 @@ + (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24113,47 +18581,20 @@ + (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24182,50 +18623,20 @@ + (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatChargeStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceClusterBatChargeStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24255,14 +18666,10 @@ + (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24270,33 +18677,10 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24327,14 +18711,10 @@ + (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24342,33 +18722,10 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24398,14 +18755,10 @@ + (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeC - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24413,33 +18766,10 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24469,15 +18799,10 @@ + (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveBatChargeFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24485,35 +18810,10 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceActiveBatChargeFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24544,15 +18844,10 @@ + (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24560,35 +18855,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24619,15 +18889,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24635,35 +18900,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PowerSourceAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24694,48 +18934,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, PowerSourceAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, PowerSourceAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24764,47 +18976,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -24833,47 +19018,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26272,14 +20430,10 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -26323,33 +20477,10 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26379,15 +20510,11 @@ + (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeBasicCommissioningInfoWithCompletion: (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningBasicCommissioningInfoStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26396,36 +20523,10 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningBasicCommissioningInfoStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, + reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26458,51 +20559,21 @@ + (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCache - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterRegulatoryLocationTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterRegulatoryLocationTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26532,15 +20603,11 @@ + (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterRegulatoryLocationTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26548,36 +20615,10 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterRegulatoryLocationTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26609,14 +20650,10 @@ + (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26625,33 +20662,10 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26681,15 +20695,11 @@ + (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttribut - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26697,36 +20707,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26757,15 +20741,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26773,36 +20753,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26833,50 +20787,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26906,47 +20830,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -26975,47 +20872,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -27651,47 +21521,20 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -27720,50 +21563,20 @@ + (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningNetworksListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningNetworksListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -27793,14 +21606,10 @@ + (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27808,33 +21617,10 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -27864,14 +21650,10 @@ + (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27879,33 +21661,10 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -27935,14 +21694,10 @@ + (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -27986,33 +21741,10 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28041,16 +21773,11 @@ + (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(self.callbackQueue, - completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28058,37 +21785,10 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast< - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge *>(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28119,47 +21819,20 @@ + (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28188,14 +21861,10 @@ + (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28203,33 +21872,10 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28259,15 +21905,11 @@ + (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28275,36 +21917,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28335,15 +21951,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28351,36 +21963,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28411,50 +21997,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28484,47 +22040,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -28553,47 +22082,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29177,15 +22679,10 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29193,36 +22690,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29253,15 +22724,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29269,35 +22735,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29328,50 +22769,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29401,47 +22812,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29470,47 +22854,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29775,51 +23132,20 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsNetworkInterfacesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsNetworkInterfacesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29849,47 +23175,20 @@ + (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29918,47 +23217,20 @@ + (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -29987,14 +23259,10 @@ + (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30002,33 +23270,10 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30058,47 +23303,20 @@ + (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30127,15 +23345,10 @@ + (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30143,36 +23356,10 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30203,51 +23390,20 @@ + (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveRadioFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveRadioFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30277,15 +23433,10 @@ + (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30293,36 +23444,10 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30354,14 +23479,10 @@ + (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30369,33 +23490,10 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30425,15 +23523,10 @@ + (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30441,36 +23534,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30501,15 +23568,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30517,36 +23579,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30577,50 +23613,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30650,47 +23656,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -30719,47 +23698,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31336,50 +24288,20 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsThreadMetricsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsThreadMetricsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31409,47 +24331,20 @@ + (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31478,47 +24373,20 @@ + (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31548,14 +24416,10 @@ + (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31563,33 +24427,10 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31619,15 +24460,11 @@ + (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31635,36 +24472,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31695,15 +24506,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31711,36 +24517,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31771,50 +24551,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SoftwareDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31844,47 +24594,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -31913,47 +24636,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32363,47 +25059,20 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32432,51 +25101,21 @@ + (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32506,47 +25145,20 @@ + (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableCharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableCharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32575,47 +25187,20 @@ + (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32644,47 +25229,20 @@ + (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32713,47 +25271,20 @@ + (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32782,47 +25313,20 @@ + (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32851,51 +25355,21 @@ + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsNeighborTableListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsNeighborTableListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32925,51 +25399,20 @@ + (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsRouteTableListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsRouteTableListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -32999,47 +25442,20 @@ + (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33068,47 +25484,20 @@ + (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33137,47 +25526,20 @@ + (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33206,47 +25568,20 @@ + (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33275,47 +25610,20 @@ + (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33344,47 +25652,20 @@ + (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33413,47 +25694,20 @@ + (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33482,47 +25736,20 @@ + (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33551,47 +25778,20 @@ + (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33620,14 +25820,10 @@ + (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -33635,33 +25831,10 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33692,14 +25865,10 @@ + (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -33707,33 +25876,10 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33764,14 +25910,10 @@ + (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCache - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -33780,33 +25922,10 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33836,47 +25955,20 @@ + (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAtt - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33905,47 +25997,20 @@ + (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -33974,47 +26039,20 @@ + (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34043,47 +26081,20 @@ + (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34112,14 +26123,10 @@ + (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -34127,33 +26134,10 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34183,47 +26167,20 @@ + (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34252,14 +26209,10 @@ + (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -34267,33 +26220,10 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34323,47 +26253,20 @@ + (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34392,47 +26295,20 @@ + (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34461,47 +26337,20 @@ + (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34530,14 +26379,10 @@ + (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -34545,33 +26390,10 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34601,47 +26423,20 @@ + (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34670,47 +26465,20 @@ + (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34740,14 +26508,10 @@ + (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -34755,33 +26519,10 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34812,14 +26553,10 @@ + (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttribute - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -34828,33 +26565,10 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34884,47 +26598,20 @@ + (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttribu - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -34953,47 +26640,20 @@ + (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35022,14 +26682,10 @@ + (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -35037,33 +26693,10 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35093,47 +26726,20 @@ + (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35162,47 +26768,20 @@ + (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35231,47 +26810,20 @@ + (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35300,47 +26852,20 @@ + (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35369,47 +26894,20 @@ + (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35438,47 +26936,20 @@ + (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35507,14 +26978,10 @@ + (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -35522,33 +26989,10 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35578,47 +27022,20 @@ + (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35648,14 +27065,10 @@ + (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -35663,33 +27076,10 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35720,14 +27110,10 @@ + (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCache - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -35735,33 +27121,10 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35791,47 +27154,20 @@ + (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCach - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35860,47 +27196,20 @@ + (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -35930,14 +27239,10 @@ + (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -35945,33 +27250,10 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36002,14 +27284,10 @@ + (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCa - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36017,33 +27295,10 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36073,47 +27328,20 @@ + (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCac - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36142,47 +27370,20 @@ + (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36211,47 +27412,20 @@ + (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36280,47 +27454,20 @@ + (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36349,47 +27496,20 @@ + (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36418,47 +27538,20 @@ + (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36488,15 +27581,11 @@ + (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36504,36 +27593,10 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, + self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36564,47 +27627,20 @@ + (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36635,16 +27671,11 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: (void (^)( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void) @@ -36655,38 +27686,10 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, + reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -36721,16 +27724,11 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36738,37 +27736,10 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36799,15 +27770,11 @@ + (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36815,36 +27782,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36875,15 +27816,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36891,36 +27828,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -36951,51 +27862,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThreadNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -37025,47 +27905,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -37094,47 +27947,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39608,47 +30434,20 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39677,51 +30476,21 @@ + (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39751,53 +30520,21 @@ + (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39827,47 +30564,20 @@ + (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39896,47 +30606,20 @@ + (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -39965,47 +30648,20 @@ + (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attrib - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40034,47 +30690,20 @@ + (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40104,14 +30733,10 @@ + (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40119,33 +30744,10 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40176,14 +30778,10 @@ + (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCache - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40191,33 +30789,10 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40247,14 +30822,10 @@ + (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCache - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40262,33 +30833,10 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40318,14 +30866,10 @@ + (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40333,33 +30877,10 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40389,47 +30910,20 @@ + (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40458,47 +30952,20 @@ + (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40527,15 +30994,11 @@ + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40543,36 +31006,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40603,15 +31040,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40619,36 +31052,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40679,51 +31086,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WiFiNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40753,47 +31129,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -40822,47 +31171,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41576,53 +31898,21 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41652,47 +31942,20 @@ + (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41721,47 +31984,20 @@ + (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41790,47 +32026,20 @@ + (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41859,47 +32068,20 @@ + (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41928,47 +32110,20 @@ + (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -41997,47 +32152,20 @@ + (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42066,47 +32194,20 @@ + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42135,47 +32236,20 @@ + (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42204,15 +32278,11 @@ + (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42220,36 +32290,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42280,15 +32324,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42296,36 +32336,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42356,51 +32370,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - EthernetNetworkDiagnosticsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42430,47 +32414,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -42499,47 +32456,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43085,47 +33015,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43154,47 +33057,20 @@ + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43223,47 +33099,20 @@ + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43292,14 +33141,10 @@ + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -43343,33 +33188,10 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43398,47 +33220,20 @@ + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43467,14 +33262,10 @@ + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43482,33 +33273,10 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43538,47 +33306,20 @@ + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43607,14 +33348,10 @@ + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43622,33 +33359,10 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43678,47 +33392,20 @@ + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43747,47 +33434,20 @@ + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43816,47 +33476,20 @@ + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43885,47 +33518,20 @@ + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -43954,47 +33560,20 @@ + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44023,47 +33602,20 @@ + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44092,47 +33644,20 @@ + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44161,15 +33686,10 @@ + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44177,36 +33697,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44237,15 +33731,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44253,36 +33742,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44313,50 +33776,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BridgedDeviceBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44386,47 +33819,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -44455,47 +33861,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45245,47 +34624,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45314,47 +34666,20 @@ + (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45383,47 +34708,20 @@ + (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45452,14 +34750,10 @@ + (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SwitchGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45467,34 +34761,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SwitchGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45525,14 +34795,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SwitchAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45540,34 +34806,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - SwitchAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45597,48 +34839,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, SwitchAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, SwitchAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45667,47 +34881,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -45736,47 +34923,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46211,54 +35371,21 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningClusterCommissioningWindowStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningClusterCommissioningWindowStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46288,47 +35415,20 @@ + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46357,47 +35457,20 @@ + (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46426,15 +35499,11 @@ + (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46442,36 +35511,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46502,15 +35545,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46518,36 +35557,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46578,51 +35591,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AdministratorCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46652,47 +35635,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -46721,47 +35677,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47342,48 +36271,19 @@ - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTROperationalCredentialsNOCsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsNOCsListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsNOCsListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47415,50 +36315,19 @@ - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTROperationalCredentialsFabricsListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsFabricsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsFabricsListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47488,47 +36357,20 @@ + (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47557,14 +36399,10 @@ + (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47572,33 +36410,10 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47629,15 +36444,11 @@ + (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsTrustedRootCertificatesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47645,36 +36456,10 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsTrustedRootCertificatesListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47705,14 +36490,10 @@ + (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCach - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47720,33 +36501,10 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47776,15 +36534,11 @@ + (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47792,36 +36546,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47852,15 +36580,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47868,36 +36592,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -47928,51 +36626,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -48002,47 +36669,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -48071,47 +36711,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -48762,15 +37375,9 @@ - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGroupKeyMapListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -48837,35 +37444,10 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGroupKeyMapListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -48897,50 +37479,19 @@ - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGroupTableListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGroupTableListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -48970,14 +37521,10 @@ + (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48985,33 +37532,10 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49041,14 +37565,10 @@ + (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49056,33 +37576,10 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49112,15 +37609,10 @@ + (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49128,36 +37620,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49188,15 +37654,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49204,36 +37665,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49264,50 +37699,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49337,47 +37742,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49406,47 +37784,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49846,48 +38197,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FixedLabelLabelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FixedLabelLabelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49916,15 +38239,10 @@ + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FixedLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49932,35 +38250,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FixedLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -49991,15 +38284,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FixedLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50007,35 +38295,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FixedLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50066,48 +38329,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FixedLabelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FixedLabelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50136,47 +38371,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50205,47 +38413,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50507,14 +38688,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelLabelListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UserLabelLabelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -50580,33 +38757,10 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UserLabelLabelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50635,15 +38789,10 @@ + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UserLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50651,35 +38800,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UserLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50710,15 +38834,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UserLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50726,35 +38845,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UserLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50785,48 +38879,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UserLabelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UserLabelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50855,47 +38921,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -50924,47 +38963,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51236,47 +39248,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51305,15 +39290,10 @@ + (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51321,35 +39301,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51380,15 +39335,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51396,35 +39346,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51455,48 +39380,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BooleanStateAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51525,47 +39422,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51594,47 +39464,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51923,47 +39766,20 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -51992,47 +39808,20 @@ + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52061,48 +39850,20 @@ + (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ModeSelectSupportedModesListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ModeSelectSupportedModesListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52131,47 +39892,20 @@ + (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52200,14 +39934,10 @@ + (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52256,33 +39986,10 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52311,14 +40018,10 @@ + (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52367,33 +40070,10 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52422,15 +40102,10 @@ + (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ModeSelectGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52438,35 +40113,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ModeSelectGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52497,15 +40147,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ModeSelectAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52513,35 +40158,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ModeSelectAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52572,48 +40192,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ModeSelectAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ModeSelectAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52642,47 +40234,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -52711,47 +40276,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -53808,50 +41346,20 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableDoorLockClusterDlLockStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableDoorLockClusterDlLockStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -53881,48 +41389,20 @@ + (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterDlLockTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockClusterDlLockTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -53951,47 +41431,20 @@ + (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54020,50 +41473,20 @@ + (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableDoorLockClusterDlDoorStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableDoorLockClusterDlDoorStateAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54093,14 +41516,10 @@ + (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -54144,33 +41563,10 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54199,14 +41595,10 @@ + (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -54250,33 +41642,10 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54305,14 +41674,10 @@ + (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -54356,33 +41721,10 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54412,14 +41754,10 @@ + (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54427,33 +41765,10 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54484,14 +41799,10 @@ + (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttribute - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54499,33 +41810,10 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54556,14 +41844,10 @@ + (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCa - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54571,33 +41855,10 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54628,14 +41889,10 @@ + (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeC - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54644,33 +41901,10 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: @@ -54702,14 +41936,10 @@ + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54718,33 +41948,10 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: @@ -54776,14 +41983,10 @@ + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54792,33 +41995,10 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54848,47 +42028,20 @@ + (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAtt - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54917,47 +42070,20 @@ + (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -54986,47 +42112,20 @@ + (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55055,47 +42154,20 @@ + (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55125,14 +42197,10 @@ + (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockCredentialRulesSupportAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55140,34 +42208,10 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockCredentialRulesSupportAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55199,14 +42243,10 @@ + (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCache - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55215,33 +42255,10 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55271,14 +42288,10 @@ + (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRA - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55322,33 +42335,10 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55377,14 +42367,10 @@ + (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55428,33 +42414,10 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55483,14 +42446,10 @@ + (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55534,33 +42493,10 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55589,14 +42525,10 @@ + (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55640,33 +42572,10 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55695,14 +42604,10 @@ + (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterDlOperatingModeAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55746,34 +42651,10 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterDlOperatingModeAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55804,15 +42685,10 @@ + (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockSupportedOperatingModesAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55820,35 +42696,10 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockSupportedOperatingModesAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55880,15 +42731,10 @@ + (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCach - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockDefaultConfigurationRegisterAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55897,35 +42743,10 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockDefaultConfigurationRegisterAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -55957,14 +42778,10 @@ + (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttribut - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56009,33 +42826,10 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56065,14 +42859,10 @@ + (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCache - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56117,33 +42907,10 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56173,14 +42940,10 @@ + (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56225,33 +42988,10 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56282,14 +43022,10 @@ + (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56334,33 +43070,10 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56391,15 +43104,10 @@ + (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCach - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockLocalProgrammingFeaturesAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56444,35 +43152,10 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockLocalProgrammingFeaturesAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56503,14 +43186,10 @@ + (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCac - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56555,33 +43234,10 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56612,14 +43268,10 @@ + (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56665,33 +43317,10 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56721,14 +43350,10 @@ + (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttribut - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56772,33 +43397,10 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56828,14 +43430,10 @@ + (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56881,33 +43479,10 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -56937,14 +43512,10 @@ + (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttribut - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -56989,33 +43560,10 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -57045,15 +43593,10 @@ + (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57061,35 +43604,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -57120,15 +43638,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57136,35 +43649,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -57195,48 +43683,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoorLockAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -57265,47 +43725,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -57334,47 +43767,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59360,48 +45766,20 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringClusterTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringClusterTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59431,14 +45809,10 @@ + (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attrib - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59446,33 +45820,10 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59503,14 +45854,10 @@ + (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCach - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59518,33 +45865,10 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59574,14 +45898,10 @@ + (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCach - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59589,33 +45909,10 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59645,14 +45942,10 @@ + (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59660,33 +45953,10 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59717,14 +45987,10 @@ + (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59732,33 +45998,10 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59789,14 +46032,10 @@ + (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCache - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59804,33 +46043,10 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59860,48 +46076,20 @@ + (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCache - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringConfigStatusAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringConfigStatusAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -59931,14 +46119,10 @@ + (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59947,33 +46131,10 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60004,14 +46165,10 @@ + (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttribu - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60020,33 +46177,10 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60076,50 +46210,20 @@ + (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttribu - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringOperationalStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringOperationalStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60150,14 +46254,10 @@ + (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60166,33 +46266,10 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60223,14 +46300,10 @@ + (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttri - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60239,33 +46312,10 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60295,50 +46345,20 @@ + (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttri - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringClusterEndProductTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringClusterEndProductTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60369,14 +46389,10 @@ + (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60385,33 +46401,10 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60442,14 +46435,10 @@ + (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttr - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60458,33 +46447,10 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60515,14 +46481,10 @@ + (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttr - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60530,33 +46492,10 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60587,14 +46526,10 @@ + (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCache - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60602,33 +46537,10 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60659,14 +46571,10 @@ + (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCac - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60674,33 +46582,10 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60731,14 +46616,10 @@ + (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCache - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60746,33 +46627,10 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60802,14 +46660,10 @@ + (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCac - (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringModeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60853,33 +46707,10 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringModeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60908,48 +46739,20 @@ + (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attrib - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringSafetyStatusAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WindowCoveringSafetyStatusAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -60978,15 +46781,10 @@ + (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60994,36 +46792,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -61054,15 +46826,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61070,35 +46837,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -61129,50 +46871,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WindowCoveringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -61202,47 +46914,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -61271,47 +46956,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62430,14 +48088,10 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62445,33 +48099,10 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62501,14 +48132,10 @@ + (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62516,33 +48143,10 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62572,14 +48176,10 @@ + (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62587,33 +48187,10 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62643,14 +48220,10 @@ + (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -62694,33 +48267,10 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62749,14 +48299,10 @@ + (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -62801,33 +48347,10 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62858,14 +48381,10 @@ + (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -62910,33 +48429,10 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -62967,14 +48463,10 @@ + (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCac - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -63019,33 +48511,10 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63075,14 +48544,10 @@ + (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCa - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -63126,33 +48591,10 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63181,14 +48623,10 @@ + (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -63233,33 +48671,10 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63289,47 +48704,20 @@ + (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63358,15 +48746,10 @@ + (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -63374,36 +48757,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63434,15 +48791,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -63450,35 +48802,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63509,50 +48836,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BarrierControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63582,47 +48879,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -63651,47 +48921,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64358,47 +49601,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64427,47 +49643,20 @@ + (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64496,47 +49685,20 @@ + (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64565,47 +49727,20 @@ + (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64634,47 +49769,20 @@ + (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64703,47 +49811,20 @@ + (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64772,47 +49853,20 @@ + (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64841,47 +49895,20 @@ + (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64910,47 +49937,20 @@ + (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -64979,47 +49979,20 @@ + (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65048,47 +50021,20 @@ + (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65117,47 +50063,20 @@ + (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65186,47 +50105,20 @@ + (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65255,50 +50147,20 @@ + (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlPumpStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlPumpStatusAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65329,16 +50191,11 @@ + (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpOperationModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65346,37 +50203,10 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpOperationModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65407,15 +50237,11 @@ + (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCache - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpControlModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65423,36 +50249,10 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpControlModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65483,47 +50283,20 @@ + (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65552,47 +50325,20 @@ + (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65621,14 +50367,10 @@ + (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -65678,33 +50420,10 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65734,47 +50453,20 @@ + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65804,14 +50496,10 @@ + (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -65861,33 +50549,10 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -65917,16 +50582,11 @@ + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCache - (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpOperationModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -65970,37 +50630,10 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpOperationModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66030,15 +50663,11 @@ + (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpControlModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -66082,36 +50711,10 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlClusterPumpControlModeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66141,16 +50744,11 @@ + (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -66158,37 +50756,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66219,15 +50790,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -66235,36 +50802,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66295,51 +50836,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PumpConfigurationAndControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66369,47 +50880,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -66438,47 +50922,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -67685,47 +52142,20 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -67754,14 +52184,10 @@ + (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67769,33 +52195,10 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -67825,47 +52228,20 @@ + (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -67895,14 +52271,10 @@ + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67910,33 +52282,10 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -67967,14 +52316,10 @@ + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCach - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67982,33 +52327,10 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68039,14 +52361,10 @@ + (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCach - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68054,33 +52372,10 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68111,14 +52406,10 @@ + (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCach - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68126,33 +52417,10 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68182,47 +52450,20 @@ + (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCach - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68251,47 +52492,20 @@ + (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68321,14 +52535,10 @@ + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68373,33 +52583,10 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68430,14 +52617,10 @@ + (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttribute - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68482,33 +52665,10 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68539,14 +52699,10 @@ + (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttribute - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68591,33 +52747,10 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68648,14 +52781,10 @@ + (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCach - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68700,33 +52829,10 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68757,14 +52863,10 @@ + (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCach - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68809,33 +52911,10 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68866,14 +52945,10 @@ + (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCa - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -68918,33 +52993,10 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -68974,14 +53026,10 @@ + (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCa - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69026,33 +53074,10 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69082,14 +53107,10 @@ + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69134,33 +53155,10 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69190,14 +53188,10 @@ + (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69242,33 +53236,10 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69298,14 +53269,10 @@ + (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69350,33 +53317,10 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69406,14 +53350,10 @@ + (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69458,33 +53398,10 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69514,14 +53431,10 @@ + (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69565,33 +53478,10 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69621,15 +53511,11 @@ + (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterThermostatControlSequenceAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69674,36 +53560,10 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterThermostatControlSequenceAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69734,14 +53594,10 @@ + (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeC - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -69785,33 +53641,10 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69840,14 +53673,10 @@ + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69855,33 +53684,10 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69911,47 +53717,20 @@ + (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -69981,14 +53760,10 @@ + (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69996,33 +53771,10 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70053,14 +53805,10 @@ + (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCa - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70068,33 +53816,10 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70125,14 +53850,10 @@ + (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCac - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70177,33 +53898,10 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70234,14 +53932,10 @@ + (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCach - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value @@ -70293,33 +53987,10 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70350,14 +54021,10 @@ + (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttri - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value @@ -70404,33 +54071,10 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70461,14 +54105,10 @@ + (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAt - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70476,33 +54116,10 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70532,14 +54149,10 @@ + (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCache - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70547,33 +54160,10 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70603,14 +54193,10 @@ + (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70618,33 +54204,10 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70675,14 +54238,10 @@ + (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70691,33 +54250,10 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70747,14 +54283,10 @@ + (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttribu - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -70803,33 +54335,10 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70858,14 +54367,10 @@ + (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70873,33 +54378,10 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -70929,14 +54411,10 @@ + (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70944,33 +54422,10 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71000,14 +54455,10 @@ + (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -71056,33 +54507,10 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71111,14 +54539,10 @@ + (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71126,33 +54550,10 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71182,14 +54583,10 @@ + (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71197,33 +54594,10 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71253,14 +54627,10 @@ + (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71305,33 +54675,10 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71361,14 +54708,10 @@ + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71412,33 +54755,10 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71467,14 +54787,10 @@ + (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71518,33 +54834,10 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71573,14 +54866,10 @@ + (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71624,33 +54913,10 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71679,14 +54945,10 @@ + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71730,33 +54992,10 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71785,14 +55024,10 @@ + (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71836,33 +55071,10 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71891,14 +55103,10 @@ + (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -71942,33 +55150,10 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -71997,47 +55182,20 @@ + (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72066,14 +55224,10 @@ + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72117,33 +55271,10 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72172,15 +55303,10 @@ + (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72188,35 +55314,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72247,15 +55348,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72263,35 +55359,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72322,48 +55393,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ThermostatAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ThermostatAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72392,47 +55435,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -72461,47 +55477,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -74779,14 +57768,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FanControlClusterFanModeTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74830,34 +57815,10 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FanControlClusterFanModeTypeAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -74886,15 +57847,10 @@ + (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlClusterFanModeSequenceTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74938,35 +57894,10 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlClusterFanModeSequenceTypeAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -74996,14 +57927,10 @@ + (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -75052,33 +57979,10 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75107,47 +58011,20 @@ + (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75176,47 +58053,20 @@ + (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75245,14 +58095,10 @@ + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -75301,33 +58147,10 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75356,47 +58179,20 @@ + (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75425,47 +58221,20 @@ + (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75494,14 +58263,10 @@ + (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -75545,33 +58310,10 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75600,47 +58342,20 @@ + (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75669,14 +58384,10 @@ + (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -75720,33 +58431,10 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75775,15 +58463,10 @@ + (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75791,35 +58474,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75850,15 +58508,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75866,35 +58519,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FanControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75925,48 +58553,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FanControlAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FanControlAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -75995,47 +58595,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -76064,47 +58637,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -76768,14 +59314,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -76820,33 +59362,10 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -76876,14 +59395,10 @@ + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCache - (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -76927,33 +59442,10 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -76983,14 +59475,10 @@ + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -77036,33 +59524,10 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -77092,16 +59557,11 @@ + (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttribu - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -77109,38 +59569,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -77171,16 +59603,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -77188,38 +59615,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -77250,54 +59649,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -77327,47 +59693,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -77396,47 +59735,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78399,47 +60711,20 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78468,47 +60753,20 @@ + (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78537,47 +60795,20 @@ + (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78606,47 +60837,20 @@ + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78675,47 +60879,20 @@ + (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78744,47 +60921,20 @@ + (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78813,47 +60963,20 @@ + (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78883,14 +61006,10 @@ + (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78898,33 +61017,10 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -78954,47 +61050,20 @@ + (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCache - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79023,14 +61092,10 @@ + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -79074,33 +61139,10 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79129,47 +61171,20 @@ + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79198,47 +61213,20 @@ + (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79267,47 +61255,20 @@ + (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79336,47 +61297,20 @@ + (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79405,47 +61339,20 @@ + (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79474,47 +61381,20 @@ + (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79543,47 +61423,20 @@ + (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79612,47 +61465,20 @@ + (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79681,47 +61507,20 @@ + (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79750,47 +61549,20 @@ + (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79819,47 +61591,20 @@ + (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79888,47 +61633,20 @@ + (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -79957,47 +61675,20 @@ + (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80026,47 +61717,20 @@ + (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80095,47 +61759,20 @@ + (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80164,47 +61801,20 @@ + (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80233,47 +61843,20 @@ + (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80302,47 +61885,20 @@ + (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80371,47 +61927,20 @@ + (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80440,14 +61969,10 @@ + (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80491,33 +62016,10 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80546,14 +62048,10 @@ + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80597,33 +62095,10 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80652,14 +62127,10 @@ + (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80703,33 +62174,10 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80758,14 +62206,10 @@ + (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80809,33 +62253,10 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80864,14 +62285,10 @@ + (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -80921,33 +62338,10 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -80977,14 +62371,10 @@ + (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -81028,33 +62418,10 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81083,14 +62450,10 @@ + (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -81134,33 +62497,10 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81189,14 +62529,10 @@ + (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -81246,33 +62582,10 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81302,14 +62615,10 @@ + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -81353,33 +62662,10 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81408,14 +62694,10 @@ + (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -81459,33 +62741,10 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81514,14 +62773,10 @@ + (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -81571,33 +62826,10 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81627,14 +62859,10 @@ + (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81642,33 +62870,10 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81698,47 +62903,20 @@ + (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81767,47 +62945,20 @@ + (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81836,14 +62987,10 @@ + (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81851,33 +62998,10 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81907,47 +63031,20 @@ + (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -81977,14 +63074,10 @@ + (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81992,33 +63085,10 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82049,14 +63119,10 @@ + (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCa - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82064,33 +63130,10 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82120,47 +63163,20 @@ + (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeC - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82190,14 +63206,10 @@ + (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82205,33 +63217,10 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82262,14 +63251,10 @@ + (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeC - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82277,33 +63262,10 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82334,14 +63296,10 @@ + (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeC - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82350,33 +63308,10 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82407,14 +63342,10 @@ + (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttri - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -82465,33 +63396,10 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82521,15 +63429,10 @@ + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttribu - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82537,35 +63440,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82596,15 +63474,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82612,35 +63485,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82671,48 +63519,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ColorControlAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82741,47 +63561,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -82810,47 +63603,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85104,47 +65870,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85173,47 +65912,20 @@ + (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85242,47 +65954,20 @@ + (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85311,14 +65996,10 @@ + (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -85362,33 +66043,10 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85417,14 +66075,10 @@ + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -85468,33 +66122,10 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85524,14 +66155,10 @@ + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeIntrinsicBalanceFactorWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -85581,33 +66208,10 @@ - (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85638,14 +66242,10 @@ + (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCache - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -85695,33 +66295,10 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85751,47 +66328,20 @@ + (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCach - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85820,14 +66370,10 @@ + (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -85871,33 +66417,10 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -85926,14 +66449,10 @@ + (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -85977,33 +66496,10 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86032,14 +66528,10 @@ + (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -86088,33 +66580,10 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86143,14 +66612,10 @@ + (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -86199,33 +66664,10 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86254,14 +66696,10 @@ + (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -86305,33 +66743,10 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86361,14 +66776,10 @@ + (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -86418,33 +66829,10 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86474,15 +66862,11 @@ + (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -86490,36 +66874,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86550,15 +66908,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -86566,36 +66920,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86626,50 +66954,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - BallastConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86699,47 +66997,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -86768,47 +67039,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87626,47 +67870,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87695,47 +67912,20 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87764,47 +67954,20 @@ + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87833,47 +67996,20 @@ + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87902,47 +68038,20 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -87971,15 +68080,11 @@ + (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87987,36 +68092,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88047,15 +68126,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88063,36 +68138,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88123,51 +68172,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - IlluminanceMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88197,47 +68215,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88266,47 +68257,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88708,47 +68672,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88777,47 +68714,20 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88846,47 +68756,20 @@ + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88915,47 +68798,20 @@ + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -88984,15 +68840,11 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89000,36 +68852,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89060,15 +68886,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89076,36 +68898,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89136,51 +68932,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TemperatureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89210,47 +68975,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89279,47 +69017,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89686,47 +69397,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89755,47 +69439,20 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89824,47 +69481,20 @@ + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89893,47 +69523,20 @@ + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -89962,47 +69565,20 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90031,47 +69607,20 @@ + (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90100,47 +69649,20 @@ + (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90169,47 +69691,20 @@ + (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90238,47 +69733,20 @@ + (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90307,15 +69775,11 @@ + (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90323,36 +69787,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90383,15 +69821,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90399,36 +69832,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90459,50 +69866,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - PressureMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90532,47 +69909,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -90601,47 +69951,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91176,47 +70499,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91245,47 +70541,20 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91314,47 +70583,20 @@ + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91383,47 +70625,20 @@ + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91452,15 +70667,10 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91468,36 +70678,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91528,15 +70712,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91544,36 +70723,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91604,50 +70757,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - FlowMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91677,47 +70800,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -91746,47 +70842,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92153,47 +71222,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92222,47 +71264,20 @@ + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92291,47 +71306,20 @@ + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92360,47 +71348,20 @@ + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92429,16 +71390,11 @@ + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge - = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92446,37 +71402,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92507,15 +71436,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92523,36 +71448,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92583,51 +71482,21 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RelativeHumidityMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92657,47 +71526,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -92726,47 +71568,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93133,47 +71948,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93202,14 +71990,10 @@ + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93217,33 +72001,10 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93274,14 +72035,10 @@ + (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93289,33 +72046,10 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93346,14 +72080,10 @@ + (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCa - (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -93399,33 +72129,10 @@ - (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93456,14 +72163,10 @@ + (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttribut - (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -93509,33 +72212,10 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93566,14 +72246,10 @@ + (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttribut - (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -93620,33 +72296,10 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93677,14 +72330,10 @@ + (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttr - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -93731,33 +72380,10 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93788,14 +72414,10 @@ + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRA - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -93842,33 +72464,10 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -93899,14 +72498,10 @@ + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRA - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -93955,33 +72550,10 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -94012,14 +72584,10 @@ + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:( - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -94068,33 +72636,10 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: @@ -94126,14 +72671,10 @@ + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -94182,33 +72723,10 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: @@ -94240,14 +72758,10 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -94296,33 +72810,10 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: @@ -94353,15 +72844,10 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94369,36 +72855,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -94429,15 +72889,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94445,36 +72900,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -94505,50 +72934,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OccupancySensingAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -94578,47 +72977,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -94647,47 +73019,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95447,47 +73792,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95516,15 +73834,10 @@ + (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WakeOnLanGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95532,35 +73845,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WakeOnLanGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95591,15 +73879,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WakeOnLanAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95607,35 +73890,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - WakeOnLanAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95666,48 +73924,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRWakeOnLanAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WakeOnLanAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, WakeOnLanAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95736,47 +73966,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -95805,47 +74008,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96188,47 +74364,20 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelChannelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelChannelListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96258,14 +74407,10 @@ + (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeLineupWithCompletion:(void (^)( MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelLineupStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96273,33 +74418,10 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler: (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelLineupStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96330,14 +74452,11 @@ + (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelCurrentChannelStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96345,34 +74464,10 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelCurrentChannelStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96402,15 +74497,10 @@ + (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96418,35 +74508,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96477,14 +74542,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96492,34 +74553,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96550,48 +74587,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ChannelAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96620,47 +74629,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -96689,47 +74671,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97104,48 +75059,20 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorTargetListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorTargetListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97174,47 +75101,20 @@ + (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97243,15 +75143,10 @@ + (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97259,36 +75154,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97319,15 +75188,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97335,36 +75199,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97395,50 +75233,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97468,47 +75276,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -97537,47 +75318,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98199,50 +75953,20 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackStateEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackStateEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98272,47 +75996,20 @@ + (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98341,47 +76038,20 @@ + (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98411,15 +76081,11 @@ + (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackSampledPositionStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98427,35 +76093,10 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackSampledPositionStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, + self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98486,47 +76127,20 @@ + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFloatAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98555,47 +76169,20 @@ + (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98624,47 +76211,20 @@ + (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98693,15 +76253,10 @@ + (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98709,35 +76264,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98768,15 +76298,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98784,35 +76309,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98843,48 +76343,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98914,47 +76386,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -98983,47 +76428,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -99715,48 +77133,20 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaInputInputListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaInputInputListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -99785,47 +77175,20 @@ + (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -99854,15 +77217,10 @@ + (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaInputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99870,35 +77228,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaInputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -99929,15 +77262,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaInputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99945,35 +77273,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaInputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100004,48 +77307,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaInputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, MediaInputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100074,47 +77349,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100143,47 +77391,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100538,15 +77759,10 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LowPowerGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100554,35 +77770,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LowPowerGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100613,15 +77804,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LowPowerAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100629,35 +77815,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LowPowerAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100688,48 +77849,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, LowPowerAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, LowPowerAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100758,47 +77891,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -100827,47 +77933,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101130,15 +78209,10 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101146,35 +78220,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101205,15 +78254,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101221,35 +78265,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101280,48 +78299,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, KeypadInputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, KeypadInputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101350,47 +78341,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101419,47 +78383,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101901,50 +78838,20 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAcceptHeaderListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAcceptHeaderListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -101975,14 +78882,10 @@ + (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -102027,33 +78930,10 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102083,15 +78963,10 @@ + (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttribute - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102099,36 +78974,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102159,15 +79008,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102175,36 +79019,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102235,50 +79053,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102308,47 +79096,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102377,47 +79138,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102795,48 +79529,20 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AudioOutputOutputListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AudioOutputOutputListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102865,47 +79571,20 @@ + (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -102934,15 +79613,10 @@ + (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AudioOutputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102950,35 +79624,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AudioOutputGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103009,15 +79658,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AudioOutputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103025,35 +79669,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AudioOutputAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103084,48 +79703,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AudioOutputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, AudioOutputAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103154,47 +79745,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103223,47 +79787,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103656,50 +80193,20 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherCatalogListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherCatalogListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103730,15 +80237,11 @@ + (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherCurrentAppStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value @@ -103796,35 +80299,10 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherCurrentAppStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, + self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103855,15 +80333,11 @@ + (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103871,36 +80345,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -103931,15 +80379,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103947,36 +80390,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104007,50 +80424,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104080,47 +80467,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104149,47 +80509,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104516,47 +80849,20 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104585,47 +80891,20 @@ + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104654,47 +80933,20 @@ + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104723,47 +80975,20 @@ + (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104793,15 +81018,11 @@ + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicApplicationStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104809,35 +81030,10 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicApplicationStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, + reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104869,51 +81065,21 @@ + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicClusterApplicationStatusEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicClusterApplicationStatusEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -104943,14 +81109,10 @@ + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104958,33 +81120,10 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105014,50 +81153,20 @@ + (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAllowedVendorListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAllowedVendorListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105087,15 +81196,10 @@ + (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105103,36 +81207,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105163,15 +81241,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105179,36 +81252,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105239,50 +81286,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationBasicAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105312,47 +81329,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -105381,47 +81371,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106014,15 +81977,10 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106030,35 +81988,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106089,15 +82022,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106105,35 +82033,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106164,48 +82067,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106234,47 +82109,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106303,47 +82151,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106653,47 +82474,20 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106722,47 +82516,20 @@ + (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106791,47 +82558,20 @@ + (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106860,47 +82600,20 @@ + (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106929,47 +82642,20 @@ + (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -106998,47 +82684,20 @@ + (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107067,47 +82726,20 @@ + (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107136,47 +82768,20 @@ + (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107205,47 +82810,20 @@ + (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107274,47 +82852,20 @@ + (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107343,14 +82894,10 @@ + (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107358,33 +82905,10 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107414,47 +82938,20 @@ + (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107483,14 +82980,10 @@ + (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107498,33 +82991,10 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107554,47 +83024,20 @@ + (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107623,47 +83066,20 @@ + (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107692,47 +83108,20 @@ + (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107761,47 +83150,20 @@ + (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107830,47 +83192,20 @@ + (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107899,47 +83234,20 @@ + (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -107968,47 +83276,20 @@ + (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108037,47 +83318,20 @@ + (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108106,14 +83360,10 @@ + (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108121,33 +83371,10 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108177,14 +83404,10 @@ + (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108192,33 +83415,10 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108249,14 +83449,10 @@ + (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108264,33 +83460,10 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108321,14 +83494,10 @@ + (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108336,33 +83505,10 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108393,14 +83539,10 @@ + (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108408,33 +83550,10 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108465,14 +83584,10 @@ + (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108480,33 +83595,10 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108537,14 +83629,10 @@ + (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108552,33 +83640,10 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108609,14 +83674,10 @@ + (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108624,33 +83685,10 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108681,14 +83719,10 @@ + (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttribute - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108697,33 +83731,10 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108754,14 +83765,10 @@ + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttri - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108770,33 +83777,10 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108827,14 +83811,10 @@ + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttri - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108843,33 +83823,10 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108900,14 +83857,10 @@ + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttri - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108916,33 +83869,10 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -108973,14 +83903,10 @@ + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttri - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108989,33 +83915,10 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109046,14 +83949,10 @@ + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttri - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109062,33 +83961,10 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109118,14 +83994,10 @@ + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttr - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109133,33 +84005,10 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109189,14 +84038,10 @@ + (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109204,33 +84049,10 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109260,47 +84082,20 @@ + (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109329,47 +84124,20 @@ + (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109399,14 +84167,10 @@ + (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109414,33 +84178,10 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109471,14 +84212,10 @@ + (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCa - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109487,33 +84224,10 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109543,14 +84257,10 @@ + (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttrib - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109558,33 +84268,10 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109615,14 +84302,10 @@ + (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109630,33 +84313,10 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109687,14 +84347,10 @@ + (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCac - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109702,33 +84358,10 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109759,14 +84392,10 @@ + (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeC - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109775,33 +84404,10 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109831,14 +84437,10 @@ + (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttribut - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109846,33 +84448,10 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109902,47 +84481,20 @@ + (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -109971,47 +84523,20 @@ + (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110040,47 +84565,20 @@ + (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110109,47 +84607,20 @@ + (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110178,47 +84649,20 @@ + (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110247,47 +84691,20 @@ + (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110316,47 +84733,20 @@ + (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110385,47 +84775,20 @@ + (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110454,47 +84817,20 @@ + (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110523,47 +84859,20 @@ + (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110592,47 +84901,20 @@ + (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110661,47 +84943,20 @@ + (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110731,14 +84986,10 @@ + (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value @@ -110785,33 +85036,10 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110842,14 +85070,10 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAt - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -110895,33 +85119,10 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -110952,14 +85153,10 @@ + (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttribu - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -111004,33 +85201,10 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111061,14 +85235,10 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttribute - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -111114,33 +85284,10 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111170,14 +85317,10 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttribut - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -111222,33 +85365,10 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111278,14 +85398,10 @@ + (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -111330,33 +85446,10 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111386,14 +85479,10 @@ + (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111401,33 +85490,10 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111457,47 +85523,20 @@ + (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111526,14 +85565,10 @@ + (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111541,33 +85576,10 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111597,47 +85609,20 @@ + (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111666,47 +85651,20 @@ + (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111735,47 +85693,20 @@ + (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111804,14 +85735,10 @@ + (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -111856,33 +85783,10 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111912,47 +85816,20 @@ + (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -111981,47 +85858,20 @@ + (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112050,14 +85900,10 @@ + (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -112102,33 +85948,10 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112158,47 +85981,20 @@ + (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112227,47 +86023,20 @@ + (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112296,14 +86065,10 @@ + (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112311,33 +86076,10 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112368,14 +86110,10 @@ + (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112383,33 +86121,10 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112439,14 +86154,10 @@ + (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCach - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112454,33 +86165,10 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112511,14 +86199,10 @@ + (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112526,33 +86210,10 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112582,14 +86243,10 @@ + (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCache - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112597,33 +86254,10 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112654,14 +86288,10 @@ + (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112669,33 +86299,10 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112725,47 +86332,20 @@ + (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCache - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112794,47 +86374,20 @@ + (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112863,47 +86416,20 @@ + (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -112932,14 +86458,10 @@ + (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112947,33 +86469,10 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113003,14 +86502,10 @@ + (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113018,33 +86513,10 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113074,47 +86546,20 @@ + (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113143,14 +86588,10 @@ + (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113158,33 +86599,10 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113214,14 +86632,10 @@ + (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113229,33 +86643,10 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113285,47 +86676,20 @@ + (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113354,14 +86718,10 @@ + (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113369,33 +86729,10 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113425,14 +86762,10 @@ + (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113440,33 +86773,10 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113496,47 +86806,20 @@ + (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113565,14 +86848,10 @@ + (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113580,33 +86859,10 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113636,14 +86892,10 @@ + (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113651,33 +86903,10 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113707,14 +86936,10 @@ + (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113722,33 +86947,10 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113778,14 +86980,10 @@ + (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113793,33 +86991,10 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113849,47 +87024,20 @@ + (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -113919,14 +87067,10 @@ + (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113935,33 +87079,10 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: @@ -113993,14 +87114,10 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114009,33 +87126,10 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114066,14 +87160,10 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAt - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114082,33 +87172,10 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114139,14 +87206,10 @@ + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRA - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114155,33 +87218,10 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114212,14 +87252,10 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAtt - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114228,33 +87264,10 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114285,14 +87298,10 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAt - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114300,33 +87309,10 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114357,14 +87343,10 @@ + (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCa - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114372,33 +87354,10 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114428,47 +87387,20 @@ + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttribute - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114497,14 +87429,10 @@ + (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114512,33 +87440,10 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114568,14 +87473,10 @@ + (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114583,33 +87484,10 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114639,47 +87517,20 @@ + (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114708,14 +87559,10 @@ + (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114723,33 +87570,10 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114779,14 +87603,10 @@ + (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114794,33 +87614,10 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114850,47 +87647,20 @@ + (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114919,14 +87689,10 @@ + (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114934,33 +87700,10 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -114990,14 +87733,10 @@ + (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115005,33 +87744,10 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115061,47 +87777,20 @@ + (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115130,14 +87819,10 @@ + (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115145,33 +87830,10 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115201,14 +87863,10 @@ + (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115216,33 +87874,10 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115272,14 +87907,10 @@ + (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115287,33 +87918,10 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115343,14 +87951,10 @@ + (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115358,33 +87962,10 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115414,47 +87995,20 @@ + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115484,14 +88038,10 @@ + (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115500,33 +88050,10 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: @@ -115558,14 +88085,10 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115574,33 +88097,10 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115631,14 +88131,10 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAt - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115647,33 +88143,10 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115704,14 +88177,10 @@ + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRA - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115720,33 +88189,10 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115777,14 +88223,10 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAtt - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115793,33 +88235,10 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115850,14 +88269,10 @@ + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAt - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115865,33 +88280,10 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115922,14 +88314,10 @@ + (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCa - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115937,33 +88325,10 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -115993,15 +88358,11 @@ + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttribute - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116009,36 +88370,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -116069,15 +88404,11 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116085,36 +88416,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -116145,51 +88450,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ElectricalMeasurementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -116219,47 +88493,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -116288,47 +88535,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -122532,14 +94752,10 @@ - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEve - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -122583,33 +94799,10 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -122638,14 +94831,10 @@ + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -122689,33 +94878,10 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -122744,14 +94910,10 @@ + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -122795,33 +94957,10 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -122850,14 +94989,10 @@ + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -122901,33 +95036,10 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -122956,14 +95068,10 @@ + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123007,33 +95115,10 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123062,14 +95147,10 @@ + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123113,33 +95194,10 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123168,14 +95226,10 @@ + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123219,33 +95273,10 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123274,14 +95305,10 @@ + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123325,33 +95352,10 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123380,14 +95384,10 @@ + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123431,33 +95431,10 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123486,14 +95463,10 @@ + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123537,33 +95510,10 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123592,14 +95542,10 @@ + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123643,33 +95589,10 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123698,14 +95621,10 @@ + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123749,33 +95668,10 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123804,14 +95700,10 @@ + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123855,33 +95747,10 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -123910,14 +95779,10 @@ + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -123961,33 +95826,10 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124016,14 +95858,10 @@ + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124067,33 +95905,10 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124122,14 +95937,10 @@ + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124173,33 +95984,10 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124228,14 +96016,10 @@ + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124279,33 +96063,10 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124334,14 +96095,10 @@ + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124385,33 +96142,10 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124440,14 +96174,10 @@ + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124491,33 +96221,10 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124546,14 +96253,10 @@ + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124597,33 +96300,10 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124652,14 +96332,10 @@ + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124703,33 +96379,10 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124758,14 +96411,10 @@ + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124809,33 +96458,10 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124864,14 +96490,10 @@ + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attri - (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124915,33 +96537,10 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -124970,14 +96569,10 @@ + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFloatAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125021,33 +96616,10 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRFloatAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, FloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125076,14 +96648,10 @@ + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRDoubleAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoubleAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125127,33 +96695,10 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRDoubleAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DoubleAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125182,14 +96727,10 @@ + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125233,33 +96774,10 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125288,14 +96806,10 @@ + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterListInt8uListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125360,34 +96874,10 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterListInt8uListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125416,14 +96906,10 @@ + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125488,34 +96974,10 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125545,15 +97007,10 @@ + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125620,35 +97077,10 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125679,14 +97111,10 @@ + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125730,33 +97158,10 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, OctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125785,14 +97190,10 @@ + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125836,33 +97237,10 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125891,14 +97269,10 @@ + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -125942,33 +97316,10 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -125997,14 +97348,10 @@ + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126048,33 +97395,10 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126103,14 +97427,10 @@ + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126154,33 +97474,10 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126209,14 +97506,10 @@ + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attr - (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126260,33 +97553,10 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, VendorIdAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126316,15 +97586,11 @@ + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126563,36 +97829,10 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126623,14 +97863,10 @@ + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttri - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterSimpleEnumAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126674,34 +97910,10 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterClusterSimpleEnumAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126731,14 +97943,11 @@ + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterStructAttrStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value @@ -126791,34 +98000,10 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterStructAttrStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126848,14 +98033,10 @@ + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -126900,33 +98081,10 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -126956,14 +98114,10 @@ + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127008,33 +98162,10 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127064,14 +98195,10 @@ + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127116,33 +98243,10 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127172,14 +98276,10 @@ + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127224,33 +98324,10 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127280,15 +98357,10 @@ + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127354,35 +98426,10 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127415,15 +98462,9 @@ - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)param completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRTestClusterListFabricScopedListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127544,35 +98585,10 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127602,14 +98618,10 @@ + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127653,33 +98665,10 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127708,14 +98697,10 @@ + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheConta - (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127760,33 +98745,10 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127816,14 +98778,10 @@ + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127868,33 +98826,10 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -127924,14 +98859,10 @@ + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -127975,33 +98906,10 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, BooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128030,14 +98938,10 @@ + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128086,33 +98990,10 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableBooleanAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128141,14 +99022,10 @@ + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128197,34 +99074,10 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128253,14 +99106,10 @@ + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128309,34 +99158,10 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128365,14 +99190,10 @@ + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128421,34 +99242,10 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128477,14 +99274,10 @@ + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128533,34 +99326,10 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterNullableBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128589,14 +99358,10 @@ + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128645,33 +99410,10 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128700,14 +99442,10 @@ + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128756,33 +99494,10 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128811,14 +99526,10 @@ + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128867,33 +99578,10 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -128922,14 +99610,10 @@ + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -128978,33 +99662,10 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129033,14 +99694,10 @@ + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129089,33 +99746,10 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129144,14 +99778,10 @@ + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129200,33 +99830,10 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129255,14 +99862,10 @@ + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129292,118 +99895,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); -} - -+ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -129418,39 +99910,100 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - auto * bridge = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64uAttributeCallback successCb, + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } + + ListFreer listFreer; using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); std::move(*bridge).DispatchAction(self.device); } +- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue @@ -129477,14 +100030,10 @@ + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129533,33 +100082,10 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129588,14 +100114,10 @@ + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129644,33 +100166,10 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129699,14 +100198,10 @@ + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129755,33 +100250,10 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129810,14 +100282,10 @@ + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129866,33 +100334,10 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt32sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -129921,14 +100366,10 @@ + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -129977,33 +100418,10 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130032,14 +100450,10 @@ + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130088,33 +100502,10 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130143,14 +100534,10 @@ + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130199,33 +100586,10 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130254,14 +100618,10 @@ + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130310,33 +100670,10 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt64sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130365,14 +100702,10 @@ + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130421,33 +100754,10 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130476,14 +100786,10 @@ + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130532,33 +100838,10 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130587,14 +100870,10 @@ + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableFloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130644,33 +100923,10 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableFloatAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableFloatAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130700,14 +100956,10 @@ + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableDoubleAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130757,33 +101009,10 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableDoubleAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableDoubleAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130813,14 +101042,10 @@ + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130869,33 +101094,10 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableOctetStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -130924,14 +101126,10 @@ + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableCharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion @@ -130981,33 +101179,10 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableCharStringAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131037,15 +101212,10 @@ + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableTestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -131094,35 +101264,10 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableTestClusterClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131153,15 +101298,11 @@ + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value @@ -131221,35 +101362,10 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131281,14 +101397,10 @@ + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -131339,33 +101451,10 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131396,14 +101485,10 @@ + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttribut - (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -131454,33 +101539,10 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt8sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131511,14 +101573,10 @@ + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttribut - (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -131569,33 +101627,10 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131626,14 +101661,10 @@ + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttribu - (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -131684,33 +101715,10 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, NullableInt16sAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131740,14 +101748,10 @@ + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttribu - (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131791,33 +101795,10 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int8uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131846,15 +101827,10 @@ + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -131862,35 +101838,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131921,15 +101872,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -131937,35 +101883,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TestClusterAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -131996,48 +101917,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, TestClusterAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132066,47 +101959,20 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int32uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132135,47 +102001,20 @@ + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *) - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Int16uAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index e6a5ca8c3b1c6f..832818a594c26f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -35,19 +35,18 @@ DispatchSuccess(context, objCValue); }; -void MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -63,19 +62,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -86,19 +84,18 @@ DispatchSuccess(context, objCValue); }; -void MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -114,19 +111,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -137,19 +133,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -164,19 +159,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -187,19 +181,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -214,19 +207,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -237,19 +229,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -264,19 +255,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -287,19 +277,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -314,19 +303,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -337,19 +325,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -364,19 +351,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -387,19 +373,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -414,19 +399,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -437,19 +421,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -464,19 +447,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -487,19 +469,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -514,19 +495,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -537,19 +517,18 @@ DispatchSuccess(context, objCValue); }; -void MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -564,19 +543,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -587,19 +565,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -614,19 +591,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -637,19 +613,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -664,19 +639,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -687,19 +661,18 @@ DispatchSuccess(context, objCValue); }; -void MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -715,19 +688,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -754,19 +726,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -793,19 +764,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -832,19 +802,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -871,19 +840,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -910,19 +878,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -949,19 +916,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -988,19 +954,18 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1027,19 +992,18 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1066,19 +1030,18 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1105,19 +1068,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1144,19 +1106,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1183,19 +1144,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1222,20 +1182,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1262,20 +1220,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1302,19 +1258,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1341,19 +1296,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1380,19 +1334,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1419,19 +1372,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1458,19 +1410,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1497,19 +1448,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1536,19 +1486,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1577,19 +1526,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1616,19 +1564,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1655,19 +1602,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1694,19 +1640,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1733,19 +1678,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1772,19 +1716,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1811,19 +1754,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1871,19 +1813,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1910,19 +1851,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1949,19 +1889,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -1988,19 +1927,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2086,19 +2024,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2127,19 +2064,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2166,19 +2102,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2205,19 +2140,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2244,19 +2178,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2291,19 +2224,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2351,19 +2283,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2390,19 +2321,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2429,19 +2359,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2468,19 +2397,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2494,19 +2422,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2533,19 +2460,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2572,19 +2498,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2611,19 +2536,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2650,20 +2574,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2690,20 +2612,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2730,19 +2650,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2773,20 +2692,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2813,20 +2730,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2853,20 +2768,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2893,19 +2806,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2932,19 +2844,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -2971,20 +2882,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3011,20 +2920,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3051,19 +2958,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3090,20 +2996,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3130,19 +3034,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3169,19 +3072,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3208,19 +3110,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3247,19 +3148,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3286,19 +3186,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3325,19 +3224,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3364,19 +3262,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3403,20 +3300,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3443,20 +3338,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3483,19 +3376,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3522,19 +3414,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3561,19 +3452,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3600,19 +3490,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3639,19 +3528,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3678,19 +3566,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3717,19 +3604,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3743,20 +3629,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3783,19 +3667,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3822,19 +3705,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3861,19 +3743,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3903,19 +3784,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3942,19 +3822,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -3981,19 +3860,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4020,19 +3898,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4059,19 +3936,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4098,19 +3974,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4137,19 +4012,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4228,19 +4102,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4267,19 +4140,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4306,19 +4178,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4345,19 +4216,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4384,19 +4254,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4423,19 +4292,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4462,19 +4330,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4525,19 +4392,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4564,19 +4430,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4603,19 +4468,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4642,19 +4506,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4704,19 +4567,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4754,19 +4616,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4785,19 +4646,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4826,21 +4686,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4867,20 +4724,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4907,20 +4762,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4947,20 +4800,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -4987,19 +4838,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5026,19 +4876,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5065,19 +4914,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5104,19 +4952,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5143,20 +4990,18 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5183,20 +5028,18 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5223,19 +5066,18 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5262,19 +5104,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5301,19 +5142,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5340,19 +5180,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5379,19 +5218,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5418,19 +5256,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5457,19 +5294,18 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5496,20 +5332,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5536,20 +5370,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5576,19 +5408,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5623,19 +5454,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5671,19 +5501,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5710,20 +5539,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5750,19 +5577,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5789,19 +5615,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5828,19 +5653,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5871,19 +5695,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5936,19 +5759,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -5975,19 +5797,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6014,19 +5835,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6053,19 +5873,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6098,19 +5917,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6137,19 +5955,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6176,19 +5993,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6215,19 +6031,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6260,19 +6075,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6299,19 +6113,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6338,19 +6151,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6377,19 +6189,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6416,19 +6227,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6455,19 +6265,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6494,19 +6303,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6555,19 +6363,18 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6594,19 +6401,18 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6633,19 +6439,18 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6672,19 +6477,18 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6696,19 +6500,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6720,19 +6523,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6744,19 +6546,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6768,19 +6569,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6807,19 +6607,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6846,19 +6645,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6885,19 +6683,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6909,19 +6706,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6933,19 +6729,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6957,19 +6752,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -6981,19 +6775,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7020,19 +6813,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7059,19 +6851,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7098,19 +6889,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7137,19 +6927,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7176,19 +6965,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7215,19 +7003,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7239,19 +7026,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7278,20 +7064,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7318,20 +7102,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7358,19 +7140,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7397,19 +7178,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7436,19 +7216,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7475,19 +7254,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7514,19 +7292,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7553,19 +7330,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7592,19 +7368,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7631,21 +7406,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7672,21 +7444,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7713,21 +7482,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7754,19 +7520,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7793,19 +7558,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7832,19 +7596,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7871,19 +7634,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7910,19 +7672,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7949,19 +7710,18 @@ DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -7988,19 +7748,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8027,19 +7786,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8066,19 +7824,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8105,19 +7862,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8144,19 +7900,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8183,19 +7938,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8222,19 +7976,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8261,19 +8014,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8300,19 +8052,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8339,19 +8090,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8378,19 +8128,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8417,19 +8166,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8456,20 +8204,18 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8496,20 +8242,18 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8536,19 +8280,18 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8575,19 +8318,18 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8614,19 +8356,18 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8653,19 +8394,18 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8692,19 +8432,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8731,19 +8470,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8770,19 +8508,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8832,19 +8569,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8878,19 +8614,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8929,19 +8664,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -8968,19 +8702,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9007,19 +8740,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9046,19 +8778,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9089,19 +8820,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9128,19 +8858,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9167,19 +8896,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9206,19 +8934,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9240,19 +8967,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9279,19 +9005,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9318,19 +9043,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9357,19 +9081,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9404,19 +9127,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9443,19 +9165,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9482,19 +9203,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9521,19 +9241,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9560,19 +9279,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9599,19 +9317,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9638,19 +9355,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9677,19 +9393,18 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9716,19 +9431,18 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9755,19 +9469,18 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9794,19 +9507,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9833,19 +9545,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9872,19 +9583,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9911,19 +9621,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9955,19 +9664,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -9994,19 +9702,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10033,19 +9740,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10072,19 +9778,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10111,19 +9816,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10149,19 +9853,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10188,19 +9891,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10227,19 +9929,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10266,19 +9967,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10294,19 +9994,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10333,19 +10032,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10372,19 +10070,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10411,19 +10108,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10450,19 +10146,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10489,19 +10184,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10528,19 +10222,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10567,19 +10260,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10606,19 +10298,18 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10645,19 +10336,18 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10684,19 +10374,18 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10708,19 +10397,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10732,19 +10420,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10756,19 +10443,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10780,19 +10466,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10819,19 +10504,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10858,19 +10542,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -10900,19 +10583,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11112,19 +10794,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11144,19 +10825,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11183,19 +10863,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11278,19 +10957,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11306,19 +10984,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11334,19 +11011,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11362,19 +11038,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11390,19 +11065,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11428,19 +11102,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11467,19 +11140,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11506,19 +11178,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -11545,19 +11216,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13371,19 +13041,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13399,20 +13068,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13424,19 +13091,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13452,19 +13118,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13476,19 +13141,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13504,19 +13168,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13528,19 +13191,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13556,20 +13218,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13581,19 +13241,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13609,20 +13268,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13634,19 +13291,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13662,19 +13318,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13686,19 +13341,18 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13714,19 +13368,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13738,19 +13391,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13766,19 +13418,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13790,19 +13441,18 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13818,19 +13468,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13842,19 +13491,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13870,19 +13518,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13894,19 +13541,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13922,19 +13568,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13946,19 +13591,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13974,19 +13618,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -13998,19 +13641,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14026,19 +13668,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14050,19 +13691,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14078,19 +13718,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14102,19 +13741,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14130,19 +13768,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14154,19 +13791,18 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14182,19 +13818,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14206,21 +13841,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14236,21 +13868,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14262,20 +13891,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14291,21 +13918,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14317,19 +13941,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14345,21 +13968,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14371,21 +13991,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14402,21 +14019,18 @@ }; void MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) + OnSubscriptionEstablished() { - auto * self - = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14428,21 +14042,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14458,21 +14069,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14484,20 +14092,18 @@ DispatchSuccess(context, objCValue); }; -void MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14513,21 +14119,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14539,19 +14142,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14567,20 +14169,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14592,19 +14192,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14620,20 +14219,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14645,19 +14242,18 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14673,19 +14269,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14697,19 +14292,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14725,19 +14319,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14749,19 +14342,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14777,19 +14369,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14801,19 +14392,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14829,19 +14419,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14853,19 +14442,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14881,19 +14469,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14905,19 +14492,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14933,19 +14519,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14957,19 +14542,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -14985,19 +14569,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15009,19 +14592,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15037,19 +14619,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15061,19 +14642,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15089,19 +14669,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15113,19 +14692,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15141,21 +14719,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15167,20 +14742,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15196,21 +14769,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15222,21 +14792,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15252,22 +14819,19 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { - auto * self - = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15279,19 +14843,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15307,19 +14870,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15331,19 +14893,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15359,19 +14920,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15383,19 +14943,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15411,19 +14970,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15435,19 +14993,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15463,20 +15020,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15488,19 +15043,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15516,20 +15070,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15541,19 +15093,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15569,20 +15120,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15594,19 +15143,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15622,19 +15170,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15646,19 +15193,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15674,20 +15220,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15699,19 +15243,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15727,20 +15270,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15752,19 +15293,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15780,20 +15320,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15805,19 +15343,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15833,20 +15370,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15858,21 +15393,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15888,22 +15420,19 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { - auto * self - = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15915,21 +15444,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15945,21 +15471,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15971,19 +15494,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -15999,20 +15521,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16024,20 +15544,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16053,21 +15571,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16079,19 +15594,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16107,21 +15621,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16133,19 +15644,18 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16161,21 +15671,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16187,19 +15694,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16215,20 +15721,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16240,19 +15744,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16268,20 +15771,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16293,21 +15794,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16324,21 +15822,18 @@ }; void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) + OnSubscriptionEstablished() { - auto * self - = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16350,19 +15845,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16378,20 +15872,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16403,20 +15895,18 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16432,21 +15922,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16458,20 +15945,18 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16487,21 +15972,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16513,19 +15995,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16541,19 +16022,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16565,19 +16045,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16593,19 +16072,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16617,19 +16095,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16645,19 +16122,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16669,19 +16145,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16697,19 +16172,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16721,19 +16195,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16749,19 +16222,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16773,19 +16245,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16801,19 +16272,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16825,19 +16295,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16853,19 +16322,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16877,19 +16345,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16905,19 +16372,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16929,19 +16395,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16957,19 +16422,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -16981,19 +16445,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17009,19 +16472,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17033,19 +16495,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17061,19 +16522,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17085,19 +16545,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17113,19 +16572,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17136,19 +16594,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17164,19 +16621,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17188,19 +16644,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17216,19 +16671,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17240,19 +16694,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17268,19 +16721,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17292,19 +16744,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17320,20 +16771,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17345,19 +16794,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17373,20 +16821,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17398,19 +16844,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17426,20 +16871,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17451,19 +16894,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17479,19 +16921,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17503,19 +16944,18 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17531,19 +16971,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17555,19 +16994,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17583,19 +17021,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17607,19 +17044,18 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17635,19 +17071,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17659,20 +17094,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17688,21 +17121,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17714,20 +17144,18 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17743,21 +17171,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17769,19 +17194,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17797,19 +17221,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17821,19 +17244,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17849,20 +17271,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17874,19 +17294,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17902,19 +17321,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17926,19 +17344,18 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17954,19 +17371,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -17978,19 +17394,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18006,19 +17421,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18030,19 +17444,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18058,19 +17471,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18082,19 +17494,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18110,19 +17521,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18134,19 +17544,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18162,19 +17571,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18186,19 +17594,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18214,19 +17621,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18238,19 +17644,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18266,19 +17671,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18290,19 +17694,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18318,19 +17721,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18342,19 +17744,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18370,19 +17771,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18394,19 +17794,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18422,19 +17821,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18446,19 +17844,18 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18474,19 +17871,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18498,19 +17894,18 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18526,21 +17921,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18552,19 +17944,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18580,19 +17971,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18604,19 +17994,18 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18632,19 +18021,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18656,20 +18044,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18685,21 +18071,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18711,19 +18094,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18739,20 +18121,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18764,19 +18144,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18792,19 +18171,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18816,19 +18194,18 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18844,19 +18221,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18868,19 +18244,18 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18896,19 +18271,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18920,19 +18294,18 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18948,20 +18321,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -18973,19 +18344,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19001,21 +18371,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19027,19 +18394,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19055,19 +18421,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19079,19 +18444,18 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19107,19 +18471,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19131,19 +18494,18 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19159,19 +18521,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19183,21 +18544,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19214,21 +18572,18 @@ }; void MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) + OnSubscriptionEstablished() { - auto * self - = static_cast( - context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19240,19 +18595,18 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19268,21 +18622,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self - = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19294,19 +18645,18 @@ DispatchSuccess(context, objCValue); }; -void MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19322,19 +18672,18 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19346,19 +18695,18 @@ DispatchSuccess(context, objCValue); }; -void MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } @@ -19374,18 +18722,17 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, mEstablishedHandler will be cleaned up by our destructor, // but we can clean it up earlier on successful subscription // establishment. - self->mEstablishedHandler = nil; + mEstablishedHandler = nil; } } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 528d5d99ca7178..f2a8b70d8dfd4c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -1156,7 +1156,7 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROctetStringAttributeCallbackBridge::KeepAliveOnCallback; using MTROctetStringAttributeCallbackBridge::OnDone; @@ -1186,7 +1186,7 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOctetStringAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOctetStringAttributeCallbackBridge::OnDone; @@ -1215,7 +1215,7 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRCharStringAttributeCallbackBridge::KeepAliveOnCallback; using MTRCharStringAttributeCallbackBridge::OnDone; @@ -1244,7 +1244,7 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableCharStringAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableCharStringAttributeCallbackBridge::OnDone; @@ -1273,7 +1273,7 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBooleanAttributeCallbackBridge::KeepAliveOnCallback; using MTRBooleanAttributeCallbackBridge::OnDone; @@ -1302,7 +1302,7 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableBooleanAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableBooleanAttributeCallbackBridge::OnDone; @@ -1331,7 +1331,7 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt8uAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt8uAttributeCallbackBridge::OnDone; @@ -1360,7 +1360,7 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt8uAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt8uAttributeCallbackBridge::OnDone; @@ -1389,7 +1389,7 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt8sAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt8sAttributeCallbackBridge::OnDone; @@ -1418,7 +1418,7 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt8sAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt8sAttributeCallbackBridge::OnDone; @@ -1447,7 +1447,7 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt16uAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt16uAttributeCallbackBridge::OnDone; @@ -1476,7 +1476,7 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt16uAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt16uAttributeCallbackBridge::OnDone; @@ -1505,7 +1505,7 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt16sAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt16sAttributeCallbackBridge::OnDone; @@ -1534,7 +1534,7 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt16sAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt16sAttributeCallbackBridge::OnDone; @@ -1563,7 +1563,7 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt32uAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt32uAttributeCallbackBridge::OnDone; @@ -1592,7 +1592,7 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt32uAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt32uAttributeCallbackBridge::OnDone; @@ -1621,7 +1621,7 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt32sAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt32sAttributeCallbackBridge::OnDone; @@ -1650,7 +1650,7 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt32sAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt32sAttributeCallbackBridge::OnDone; @@ -1679,7 +1679,7 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt64uAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt64uAttributeCallbackBridge::OnDone; @@ -1708,7 +1708,7 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt64uAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt64uAttributeCallbackBridge::OnDone; @@ -1737,7 +1737,7 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRInt64sAttributeCallbackBridge::KeepAliveOnCallback; using MTRInt64sAttributeCallbackBridge::OnDone; @@ -1766,7 +1766,7 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableInt64sAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableInt64sAttributeCallbackBridge::OnDone; @@ -1795,7 +1795,7 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFloatAttributeCallbackBridge::KeepAliveOnCallback; using MTRFloatAttributeCallbackBridge::OnDone; @@ -1824,7 +1824,7 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableFloatAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableFloatAttributeCallbackBridge::OnDone; @@ -1853,7 +1853,7 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoubleAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoubleAttributeCallbackBridge::OnDone; @@ -1882,7 +1882,7 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoubleAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoubleAttributeCallbackBridge::OnDone; @@ -1911,7 +1911,7 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRVendorIdAttributeCallbackBridge::KeepAliveOnCallback; using MTRVendorIdAttributeCallbackBridge::OnDone; @@ -1940,7 +1940,7 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableVendorIdAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableVendorIdAttributeCallbackBridge::OnDone; @@ -1973,7 +1973,7 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2006,7 +2006,7 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2036,7 +2036,7 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyAttributeListListAttributeCallbackBridge::OnDone; @@ -2069,7 +2069,7 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2102,7 +2102,7 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2132,7 +2132,7 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupsAttributeListListAttributeCallbackBridge::OnDone; @@ -2165,7 +2165,7 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRScenesGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2198,7 +2198,7 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRScenesAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2228,7 +2228,7 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRScenesAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRScenesAttributeListListAttributeCallbackBridge::OnDone; @@ -2261,7 +2261,7 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2293,7 +2293,7 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2323,7 +2323,7 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffAttributeListListAttributeCallbackBridge::OnDone; @@ -2356,7 +2356,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2389,7 +2389,7 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2422,7 +2422,7 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnDone; @@ -2455,7 +2455,7 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2488,7 +2488,7 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2521,7 +2521,7 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLevelControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLevelControlAttributeListListAttributeCallbackBridge::OnDone; @@ -2554,7 +2554,7 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2587,7 +2587,7 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2620,7 +2620,7 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnDone; @@ -2655,7 +2655,7 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorDeviceTypeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnDone; @@ -2685,7 +2685,7 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorServerListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorServerListListAttributeCallbackBridge::OnDone; @@ -2715,7 +2715,7 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorClientListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorClientListListAttributeCallbackBridge::OnDone; @@ -2745,7 +2745,7 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorPartsListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorPartsListListAttributeCallbackBridge::OnDone; @@ -2778,7 +2778,7 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2811,7 +2811,7 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2842,7 +2842,7 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDescriptorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDescriptorAttributeListListAttributeCallbackBridge::OnDone; @@ -2873,7 +2873,7 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBindingBindingListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBindingBindingListAttributeCallbackBridge::OnDone; @@ -2906,7 +2906,7 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBindingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -2939,7 +2939,7 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBindingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -2969,7 +2969,7 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBindingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBindingAttributeListListAttributeCallbackBridge::OnDone; @@ -3002,7 +3002,7 @@ class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAcc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlAclListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlAclListAttributeCallbackBridge::OnDone; @@ -3035,7 +3035,7 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlExtensionListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlExtensionListAttributeCallbackBridge::OnDone; @@ -3068,7 +3068,7 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3101,7 +3101,7 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3134,7 +3134,7 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlAttributeListListAttributeCallbackBridge::OnDone; @@ -3166,7 +3166,7 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsActionListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsActionListListAttributeCallbackBridge::OnDone; @@ -3199,7 +3199,7 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsEndpointListsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsEndpointListsListAttributeCallbackBridge::OnDone; @@ -3232,7 +3232,7 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3265,7 +3265,7 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3295,7 +3295,7 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsAttributeListListAttributeCallbackBridge::OnDone; @@ -3327,7 +3327,7 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBasicCapabilityMinimaStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRBasicCapabilityMinimaStructAttributeCallbackBridge::OnDone; @@ -3360,7 +3360,7 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3392,7 +3392,7 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3422,7 +3422,7 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBasicAttributeListListAttributeCallbackBridge::OnDone; @@ -3456,7 +3456,7 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3489,7 +3489,7 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3522,7 +3522,7 @@ class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnDone; @@ -3558,7 +3558,7 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnDone; @@ -3592,7 +3592,7 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3626,7 +3626,7 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3659,7 +3659,7 @@ class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnDone; @@ -3692,7 +3692,7 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnDone; @@ -3726,7 +3726,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3759,7 +3759,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3792,7 +3792,7 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnDone; @@ -3827,7 +3827,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnDone; @@ -3860,7 +3860,7 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3893,7 +3893,7 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -3926,7 +3926,7 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnDone; @@ -3959,7 +3959,7 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -3992,7 +3992,7 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4025,7 +4025,7 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitLocalizationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnDone; @@ -4058,7 +4058,7 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnDone; @@ -4091,7 +4091,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4124,7 +4124,7 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4157,7 +4157,7 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnDone; @@ -4191,7 +4191,7 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnDone; @@ -4225,7 +4225,7 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnDone; @@ -4259,7 +4259,7 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnDone; @@ -4292,7 +4292,7 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4325,7 +4325,7 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4357,7 +4357,7 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceAttributeListListAttributeCallbackBridge::OnDone; @@ -4392,7 +4392,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnDone; @@ -4425,7 +4425,7 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4458,7 +4458,7 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4491,7 +4491,7 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnDone; @@ -4527,7 +4527,7 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningNetworksListAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnDone; @@ -4560,7 +4560,7 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4593,7 +4593,7 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4626,7 +4626,7 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnDone; @@ -4659,7 +4659,7 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4692,7 +4692,7 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4725,7 +4725,7 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnDone; @@ -4760,7 +4760,7 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnDone; @@ -4793,7 +4793,7 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnDone; @@ -4826,7 +4826,7 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnDone; @@ -4859,7 +4859,7 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnDone; @@ -4892,7 +4892,7 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -4925,7 +4925,7 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -4958,7 +4958,7 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; @@ -4994,7 +4994,7 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnDone; @@ -5027,7 +5027,7 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5060,7 +5060,7 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5093,7 +5093,7 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; @@ -5128,7 +5128,7 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::OnDone; @@ -5163,7 +5163,7 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge::OnDone; @@ -5198,7 +5198,7 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnDone; @@ -5238,7 +5238,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnDone; @@ -5274,7 +5274,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnDone; @@ -5307,7 +5307,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5340,7 +5340,7 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5373,7 +5373,7 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; @@ -5406,7 +5406,7 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5439,7 +5439,7 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5472,7 +5472,7 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; @@ -5506,7 +5506,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5540,7 +5540,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5573,7 +5573,7 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; @@ -5606,7 +5606,7 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5639,7 +5639,7 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5672,7 +5672,7 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge::OnDone; @@ -5705,7 +5705,7 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSwitchGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5738,7 +5738,7 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSwitchAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5768,7 +5768,7 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRSwitchAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRSwitchAttributeListListAttributeCallbackBridge::OnDone; @@ -5802,7 +5802,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -5836,7 +5836,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -5869,7 +5869,7 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnDone; @@ -5905,7 +5905,7 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsNOCsListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnDone; @@ -5940,7 +5940,7 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsFabricsListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnDone; @@ -5974,7 +5974,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnDone; @@ -6007,7 +6007,7 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6040,7 +6040,7 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6073,7 +6073,7 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnDone; @@ -6108,7 +6108,7 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnDone; @@ -6143,7 +6143,7 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnDone; @@ -6176,7 +6176,7 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6209,7 +6209,7 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6242,7 +6242,7 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnDone; @@ -6274,7 +6274,7 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFixedLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFixedLabelLabelListListAttributeCallbackBridge::OnDone; @@ -6307,7 +6307,7 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6340,7 +6340,7 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6371,7 +6371,7 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFixedLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFixedLabelAttributeListListAttributeCallbackBridge::OnDone; @@ -6403,7 +6403,7 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUserLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUserLabelLabelListListAttributeCallbackBridge::OnDone; @@ -6436,7 +6436,7 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6469,7 +6469,7 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6499,7 +6499,7 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUserLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUserLabelAttributeListListAttributeCallbackBridge::OnDone; @@ -6532,7 +6532,7 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6565,7 +6565,7 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6598,7 +6598,7 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBooleanStateAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBooleanStateAttributeListListAttributeCallbackBridge::OnDone; @@ -6633,7 +6633,7 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRModeSelectSupportedModesListAttributeCallbackBridge::KeepAliveOnCallback; using MTRModeSelectSupportedModesListAttributeCallbackBridge::OnDone; @@ -6666,7 +6666,7 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6699,7 +6699,7 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6730,7 +6730,7 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRModeSelectAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRModeSelectAttributeListListAttributeCallbackBridge::OnDone; @@ -6763,7 +6763,7 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnDone; @@ -6796,7 +6796,7 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnDone; @@ -6829,7 +6829,7 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnDone; @@ -6862,7 +6862,7 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnDone; @@ -6895,7 +6895,7 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -6928,7 +6928,7 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -6958,7 +6958,7 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockAttributeListListAttributeCallbackBridge::OnDone; @@ -6988,7 +6988,7 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringConfigStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnDone; @@ -7021,7 +7021,7 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnDone; @@ -7050,7 +7050,7 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringModeAttributeCallbackBridge::OnDone; @@ -7080,7 +7080,7 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnDone; @@ -7113,7 +7113,7 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7146,7 +7146,7 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7179,7 +7179,7 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnDone; @@ -7212,7 +7212,7 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7245,7 +7245,7 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7278,7 +7278,7 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBarrierControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBarrierControlAttributeListListAttributeCallbackBridge::OnDone; @@ -7311,7 +7311,7 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnDone; @@ -7345,7 +7345,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7379,7 +7379,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7412,7 +7412,7 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnDone; @@ -7445,7 +7445,7 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7478,7 +7478,7 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7509,7 +7509,7 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatAttributeListListAttributeCallbackBridge::OnDone; @@ -7542,7 +7542,7 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7575,7 +7575,7 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7606,7 +7606,7 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFanControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFanControlAttributeListListAttributeCallbackBridge::OnDone; @@ -7643,7 +7643,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7680,7 +7680,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7715,7 +7715,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnDone; @@ -7748,7 +7748,7 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7781,7 +7781,7 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7814,7 +7814,7 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlAttributeListListAttributeCallbackBridge::OnDone; @@ -7847,7 +7847,7 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7880,7 +7880,7 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -7913,7 +7913,7 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnDone; @@ -7946,7 +7946,7 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -7979,7 +7979,7 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8012,7 +8012,7 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -8045,7 +8045,7 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8078,7 +8078,7 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8111,7 +8111,7 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -8144,7 +8144,7 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8177,7 +8177,7 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8210,7 +8210,7 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -8243,7 +8243,7 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8276,7 +8276,7 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8309,7 +8309,7 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -8343,7 +8343,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8377,7 +8377,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8410,7 +8410,7 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -8443,7 +8443,7 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8476,7 +8476,7 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8509,7 +8509,7 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROccupancySensingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTROccupancySensingAttributeListListAttributeCallbackBridge::OnDone; @@ -8542,7 +8542,7 @@ class MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8575,7 +8575,7 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8605,7 +8605,7 @@ class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWakeOnLanAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRWakeOnLanAttributeListListAttributeCallbackBridge::OnDone; @@ -8637,7 +8637,7 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelChannelListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelChannelListListAttributeCallbackBridge::OnDone; @@ -8669,7 +8669,7 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelLineupStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelLineupStructAttributeCallbackBridge::OnDone; @@ -8702,7 +8702,7 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelCurrentChannelStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelCurrentChannelStructAttributeCallbackBridge::OnDone; @@ -8735,7 +8735,7 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8768,7 +8768,7 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8798,7 +8798,7 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelAttributeListListAttributeCallbackBridge::OnDone; @@ -8834,7 +8834,7 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTargetNavigatorTargetListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnDone; @@ -8867,7 +8867,7 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -8900,7 +8900,7 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -8933,7 +8933,7 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnDone; @@ -8968,7 +8968,7 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnDone; @@ -9001,7 +9001,7 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9034,7 +9034,7 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9067,7 +9067,7 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnDone; @@ -9099,7 +9099,7 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaInputInputListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaInputInputListListAttributeCallbackBridge::OnDone; @@ -9132,7 +9132,7 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9165,7 +9165,7 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9196,7 +9196,7 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaInputAttributeListListAttributeCallbackBridge::OnDone; @@ -9229,7 +9229,7 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9262,7 +9262,7 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9292,7 +9292,7 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLowPowerAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRLowPowerAttributeListListAttributeCallbackBridge::OnDone; @@ -9325,7 +9325,7 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9358,7 +9358,7 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9390,7 +9390,7 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRKeypadInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRKeypadInputAttributeListListAttributeCallbackBridge::OnDone; @@ -9423,7 +9423,7 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnDone; @@ -9456,7 +9456,7 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9489,7 +9489,7 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9522,7 +9522,7 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherAttributeListListAttributeCallbackBridge::OnDone; @@ -9554,7 +9554,7 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAudioOutputOutputListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAudioOutputOutputListListAttributeCallbackBridge::OnDone; @@ -9587,7 +9587,7 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9620,7 +9620,7 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9652,7 +9652,7 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAudioOutputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAudioOutputAttributeListListAttributeCallbackBridge::OnDone; @@ -9685,7 +9685,7 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnDone; @@ -9721,7 +9721,7 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnDone; @@ -9754,7 +9754,7 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9787,7 +9787,7 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9820,7 +9820,7 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnDone; @@ -9855,7 +9855,7 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicApplicationStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnDone; @@ -9888,7 +9888,7 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnDone; @@ -9921,7 +9921,7 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -9954,7 +9954,7 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -9987,7 +9987,7 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnDone; @@ -10020,7 +10020,7 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -10053,7 +10053,7 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -10086,7 +10086,7 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccountLoginAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccountLoginAttributeListListAttributeCallbackBridge::OnDone; @@ -10119,7 +10119,7 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -10152,7 +10152,7 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -10185,7 +10185,7 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnDone; @@ -10214,7 +10214,7 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterBitmap8AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterBitmap8AttributeCallbackBridge::OnDone; @@ -10244,7 +10244,7 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterBitmap16AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterBitmap16AttributeCallbackBridge::OnDone; @@ -10274,7 +10274,7 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterBitmap32AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterBitmap32AttributeCallbackBridge::OnDone; @@ -10304,7 +10304,7 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterBitmap64AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterBitmap64AttributeCallbackBridge::OnDone; @@ -10334,7 +10334,7 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListInt8uListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListInt8uListAttributeCallbackBridge::OnDone; @@ -10367,7 +10367,7 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListOctetStringListAttributeCallbackBridge::OnDone; @@ -10403,7 +10403,7 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::OnDone; @@ -10438,7 +10438,7 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone; @@ -10469,7 +10469,7 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterStructAttrStructAttributeCallbackBridge::OnDone; @@ -10502,7 +10502,7 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::OnDone; @@ -10538,7 +10538,7 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterListFabricScopedListAttributeCallbackBridge::OnDone; @@ -10570,7 +10570,7 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterNullableBitmap8AttributeCallbackBridge::OnDone; @@ -10603,7 +10603,7 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterNullableBitmap16AttributeCallbackBridge::OnDone; @@ -10636,7 +10636,7 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterNullableBitmap32AttributeCallbackBridge::OnDone; @@ -10669,7 +10669,7 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterNullableBitmap64AttributeCallbackBridge::OnDone; @@ -10704,7 +10704,7 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterNullableStructStructAttributeCallbackBridge::OnDone; @@ -10737,7 +10737,7 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -10770,7 +10770,7 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -10802,7 +10802,7 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterAttributeListListAttributeCallbackBridge::OnDone; @@ -11620,7 +11620,7 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; @@ -11654,7 +11654,7 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; @@ -11687,7 +11687,7 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; @@ -11721,7 +11721,7 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; @@ -11754,7 +11754,7 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; @@ -11788,7 +11788,7 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; @@ -11821,7 +11821,7 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; @@ -11857,7 +11857,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; @@ -11890,7 +11890,7 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; @@ -11924,7 +11924,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; @@ -11957,7 +11957,7 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; @@ -11991,7 +11991,7 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; @@ -12024,7 +12024,7 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; @@ -12058,7 +12058,7 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; @@ -12089,7 +12089,7 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; @@ -12123,7 +12123,7 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; @@ -12154,7 +12154,7 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRLevelControlClusterStepModeAttributeCallbackBridge::OnDone; @@ -12188,7 +12188,7 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnDone; @@ -12220,7 +12220,7 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; @@ -12254,7 +12254,7 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; @@ -12287,7 +12287,7 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; @@ -12321,7 +12321,7 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; @@ -12354,7 +12354,7 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; @@ -12388,7 +12388,7 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; @@ -12421,7 +12421,7 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; @@ -12455,7 +12455,7 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; @@ -12488,7 +12488,7 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; @@ -12522,7 +12522,7 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; @@ -12554,7 +12554,7 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; @@ -12588,7 +12588,7 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; @@ -12621,7 +12621,7 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; @@ -12655,7 +12655,7 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; @@ -12690,7 +12690,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; @@ -12729,7 +12729,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; @@ -12763,7 +12763,7 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; @@ -12802,7 +12802,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; @@ -12835,7 +12835,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; @@ -12873,7 +12873,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; @@ -12909,7 +12909,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; @@ -12948,7 +12948,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; @@ -12983,7 +12983,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; @@ -13022,7 +13022,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; @@ -13056,7 +13056,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; @@ -13095,7 +13095,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; @@ -13128,7 +13128,7 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::OnDone; @@ -13164,7 +13164,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::OnDone; @@ -13197,7 +13197,7 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::OnDone; @@ -13231,7 +13231,7 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::OnDone; @@ -13264,7 +13264,7 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; @@ -13298,7 +13298,7 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; @@ -13331,7 +13331,7 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; @@ -13365,7 +13365,7 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; @@ -13398,7 +13398,7 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; @@ -13432,7 +13432,7 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; @@ -13465,7 +13465,7 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; @@ -13499,7 +13499,7 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; @@ -13529,7 +13529,7 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; @@ -13563,7 +13563,7 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; @@ -13596,7 +13596,7 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; @@ -13630,7 +13630,7 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; @@ -13663,7 +13663,7 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; @@ -13697,7 +13697,7 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; @@ -13730,7 +13730,7 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; @@ -13764,7 +13764,7 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; @@ -13796,7 +13796,7 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; @@ -13830,7 +13830,7 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; @@ -13863,7 +13863,7 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::OnDone; @@ -13900,7 +13900,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::OnDone; @@ -13934,7 +13934,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::OnDone; @@ -13973,7 +13973,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::OnDone; @@ -14008,7 +14008,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::OnDone; @@ -14047,7 +14047,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::OnDone; @@ -14080,7 +14080,7 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::KeepAliveOnCallback; using MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::OnDone; @@ -14114,7 +14114,7 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::OnDone; @@ -14147,7 +14147,7 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::OnDone; @@ -14181,7 +14181,7 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::OnDone; @@ -14214,7 +14214,7 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::OnDone; @@ -14248,7 +14248,7 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::OnDone; @@ -14281,7 +14281,7 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::KeepAliveOnCallback; using MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::OnDone; @@ -14317,7 +14317,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::OnDone; @@ -14350,7 +14350,7 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::OnDone; @@ -14384,7 +14384,7 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::OnDone; @@ -14417,7 +14417,7 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::OnDone; @@ -14453,7 +14453,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::OnDone; @@ -14486,7 +14486,7 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::OnDone; @@ -14520,7 +14520,7 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::OnDone; @@ -14553,7 +14553,7 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::OnDone; @@ -14589,7 +14589,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::OnDone; @@ -14622,7 +14622,7 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::OnDone; @@ -14656,7 +14656,7 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::OnDone; @@ -14689,7 +14689,7 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::OnDone; @@ -14725,7 +14725,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::OnDone; @@ -14758,7 +14758,7 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::OnDone; @@ -14794,7 +14794,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::OnDone; @@ -14829,7 +14829,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::OnDone; @@ -14868,7 +14868,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::OnDone; @@ -14903,7 +14903,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; @@ -14942,7 +14942,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; @@ -14975,7 +14975,7 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; @@ -15011,7 +15011,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; @@ -15045,7 +15045,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; @@ -15084,7 +15084,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; @@ -15117,7 +15117,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; @@ -15154,7 +15154,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; @@ -15187,7 +15187,7 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::OnDone; @@ -15224,7 +15224,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::OnDone; @@ -15257,7 +15257,7 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; @@ -15293,7 +15293,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; @@ -15326,7 +15326,7 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; @@ -15360,7 +15360,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; @@ -15397,7 +15397,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnDone; @@ -15436,7 +15436,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnDone; @@ -15469,7 +15469,7 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; @@ -15505,7 +15505,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; @@ -15539,7 +15539,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; @@ -15578,7 +15578,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; @@ -15611,7 +15611,7 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::KeepAliveOnCallback; using MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::OnDone; @@ -15649,7 +15649,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::OnDone; @@ -15679,7 +15679,7 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge::OnDone; @@ -15713,7 +15713,7 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge::OnDone; @@ -15746,7 +15746,7 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge::OnDone; @@ -15780,7 +15780,7 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge::OnDone; @@ -15813,7 +15813,7 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge::OnDone; @@ -15847,7 +15847,7 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge::OnDone; @@ -15880,7 +15880,7 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::OnDone; @@ -15914,7 +15914,7 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::OnDone; @@ -15944,7 +15944,7 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlDoorStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlDoorStateAttributeCallbackBridge::OnDone; @@ -15978,7 +15978,7 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge::OnDone; @@ -16011,7 +16011,7 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge::OnDone; @@ -16045,7 +16045,7 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge::OnDone; @@ -16078,7 +16078,7 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::OnDone; @@ -16112,7 +16112,7 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::OnDone; @@ -16142,7 +16142,7 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; @@ -16176,7 +16176,7 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; @@ -16206,7 +16206,7 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; @@ -16240,7 +16240,7 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; @@ -16273,7 +16273,7 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge::OnDone; @@ -16307,7 +16307,7 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge::OnDone; @@ -16340,7 +16340,7 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge::OnDone; @@ -16374,7 +16374,7 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge::OnDone; @@ -16407,7 +16407,7 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge::OnDone; @@ -16441,7 +16441,7 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge::OnDone; @@ -16471,7 +16471,7 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; @@ -16504,7 +16504,7 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; @@ -16535,7 +16535,7 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlUserStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlUserStatusAttributeCallbackBridge::OnDone; @@ -16569,7 +16569,7 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge::OnDone; @@ -16599,7 +16599,7 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDlUserTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDlUserTypeAttributeCallbackBridge::OnDone; @@ -16633,7 +16633,7 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge::OnDone; @@ -16666,7 +16666,7 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; @@ -16702,7 +16702,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; @@ -16735,7 +16735,7 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; @@ -16771,7 +16771,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; @@ -16804,7 +16804,7 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; @@ -16838,7 +16838,7 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; @@ -16871,7 +16871,7 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::OnDone; @@ -16905,7 +16905,7 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::OnDone; @@ -16938,7 +16938,7 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::OnDone; @@ -16972,7 +16972,7 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::OnDone; @@ -17005,7 +17005,7 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; @@ -17039,7 +17039,7 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; @@ -17069,7 +17069,7 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; @@ -17103,7 +17103,7 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; @@ -17137,7 +17137,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::OnDone; @@ -17176,7 +17176,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::OnDone; @@ -17210,7 +17210,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::OnDone; @@ -17249,7 +17249,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::OnDone; @@ -17282,7 +17282,7 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; @@ -17316,7 +17316,7 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; @@ -17349,7 +17349,7 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; @@ -17385,7 +17385,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; @@ -17418,7 +17418,7 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; @@ -17452,7 +17452,7 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; @@ -17485,7 +17485,7 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; @@ -17519,7 +17519,7 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; @@ -17552,7 +17552,7 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; @@ -17586,7 +17586,7 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; @@ -17618,7 +17618,7 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; @@ -17652,7 +17652,7 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; @@ -17685,7 +17685,7 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; @@ -17719,7 +17719,7 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; @@ -17752,7 +17752,7 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; @@ -17786,7 +17786,7 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; @@ -17818,7 +17818,7 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterColorModeAttributeCallbackBridge::OnDone; @@ -17852,7 +17852,7 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnDone; @@ -17885,7 +17885,7 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; @@ -17919,7 +17919,7 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; @@ -17952,7 +17952,7 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; @@ -17986,7 +17986,7 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; @@ -18019,7 +18019,7 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; @@ -18053,7 +18053,7 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; @@ -18086,7 +18086,7 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; @@ -18120,7 +18120,7 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; @@ -18153,7 +18153,7 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; @@ -18187,7 +18187,7 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; @@ -18220,7 +18220,7 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::OnDone; @@ -18257,7 +18257,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::OnDone; @@ -18290,7 +18290,7 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelClusterChannelStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelClusterChannelStatusEnumAttributeCallbackBridge::OnDone; @@ -18324,7 +18324,7 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge::OnDone; @@ -18357,7 +18357,7 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::OnDone; @@ -18391,7 +18391,7 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::OnDone; @@ -18424,7 +18424,7 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::OnDone; @@ -18462,7 +18462,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::OnDone; @@ -18495,7 +18495,7 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::OnDone; @@ -18531,7 +18531,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::OnDone; @@ -18564,7 +18564,7 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::OnDone; @@ -18598,7 +18598,7 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::OnDone; @@ -18631,7 +18631,7 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge::OnDone; @@ -18665,7 +18665,7 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge::OnDone; @@ -18697,7 +18697,7 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge::OnDone; @@ -18731,7 +18731,7 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge::OnDone; @@ -18764,7 +18764,7 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::OnDone; @@ -18798,7 +18798,7 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::OnDone; @@ -18831,7 +18831,7 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::OnDone; @@ -18868,7 +18868,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::OnDone; @@ -18901,7 +18901,7 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::OnDone; @@ -18935,7 +18935,7 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::OnDone; @@ -18968,7 +18968,7 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRContentLauncherClusterParameterEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRContentLauncherClusterParameterEnumAttributeCallbackBridge::OnDone; @@ -19002,7 +19002,7 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge::OnDone; @@ -19035,7 +19035,7 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::OnDone; @@ -19069,7 +19069,7 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::OnDone; @@ -19105,7 +19105,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::OnDone; @@ -19144,7 +19144,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::OnDone; @@ -19177,7 +19177,7 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::OnDone; @@ -19214,7 +19214,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::OnDone; @@ -19246,7 +19246,7 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone; @@ -19280,7 +19280,7 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone; @@ -19313,7 +19313,7 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnDone; @@ -19347,7 +19347,7 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnDone; diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 0cf5642bf40f9b..beee231b77a485 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -66,6 +66,7 @@ 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */; }; 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */; }; 51E24E73274E0DAC007CCF6E /* MTRErrorTestUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E24E72274E0DAC007CCF6E /* MTRErrorTestUtils.mm */; }; + 51E4D121291D0EB400C8C535 /* MTRBaseClustersCpp_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E4D120291D0EB400C8C535 /* MTRBaseClustersCpp_Internal.h */; }; 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */; }; 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */; }; @@ -207,6 +208,7 @@ 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerAccessControl.h; sourceTree = ""; }; 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRControllerAccessControl.mm; sourceTree = ""; }; 51E24E72274E0DAC007CCF6E /* MTRErrorTestUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRErrorTestUtils.mm; sourceTree = ""; }; + 51E4D120291D0EB400C8C535 /* MTRBaseClustersCpp_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBaseClustersCpp_Internal.h; sourceTree = ""; }; 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams.h; sourceTree = ""; }; 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams_Internal.h; sourceTree = ""; }; 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerStartupParams.mm; sourceTree = ""; }; @@ -456,6 +458,7 @@ 3CF134AE289D90FF0017A19E /* MTRNOCChainIssuer.h */, 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */, 511913F928C100EF009235E9 /* MTRBaseSubscriptionCallback.mm */, + 51E4D120291D0EB400C8C535 /* MTRBaseClustersCpp_Internal.h */, ); path = CHIP; sourceTree = ""; @@ -553,6 +556,7 @@ 1EC4CE6425CC276600D7304F /* MTRBaseClusters.h in Headers */, 2C5EEEF6268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h in Headers */, 2C8C8FC0253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h in Headers */, + 51E4D121291D0EB400C8C535 /* MTRBaseClustersCpp_Internal.h in Headers */, 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */, 998F286F26D55EC5001846C6 /* MTRP256KeypairBridge.h in Headers */, 2C222ADF255C811800E446B9 /* MTRBaseDevice_Internal.h in Headers */,