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 a8a4c9deee6540..bc06e3058ffb39 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 2ee582ea1f3598..3aa04311e72417 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -46,10 +46,6 @@ MTR_NEWLY_AVAILABLE - (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 71cb04f61e78ac..ad5833dc541cb3 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 @@ -18413,10 +14413,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18433,10 +14429,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18453,10 +14445,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18473,10 +14461,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18493,10 +14477,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18513,10 +14493,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18533,10 +14509,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18553,10 +14525,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18573,10 +14541,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18593,10 +14557,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18613,10 +14573,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18633,10 +14589,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18653,10 +14605,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18673,10 +14621,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18693,10 +14637,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18713,10 +14653,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18733,10 +14669,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18753,10 +14685,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18773,10 +14701,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18793,10 +14717,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18813,10 +14733,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18833,10 +14749,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18853,10 +14765,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18874,10 +14782,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18895,10 +14799,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18915,10 +14815,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18935,10 +14831,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18956,10 +14848,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -18977,10 +14865,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -18998,10 +14882,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19018,10 +14898,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19039,10 +14915,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19059,10 +14931,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19079,10 +14947,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19099,10 +14963,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19120,10 +14980,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19143,10 +14999,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19164,10 +15016,6 @@ MTR_NEWLY_AVAILABLE - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _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 (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, @@ -19185,10 +15033,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19206,10 +15050,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19227,10 +15067,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19248,10 +15084,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19269,10 +15101,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19291,10 +15119,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19312,10 +15136,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19333,10 +15153,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19354,10 +15170,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19375,10 +15187,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19396,10 +15204,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19417,10 +15221,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19438,10 +15238,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19459,10 +15255,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19480,10 +15272,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19501,10 +15289,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19522,10 +15306,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19543,10 +15323,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19564,10 +15340,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19585,10 +15357,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19606,10 +15374,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19627,10 +15391,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19648,10 +15408,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19669,10 +15425,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19690,10 +15442,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19711,10 +15459,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19732,10 +15476,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19753,10 +15493,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19774,10 +15510,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19795,10 +15527,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19816,10 +15544,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19837,10 +15561,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19858,10 +15578,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19879,10 +15595,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19900,10 +15612,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19921,10 +15629,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19942,10 +15646,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -19963,10 +15663,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -19984,10 +15680,6 @@ MTR_NEWLY_AVAILABLE - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _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 (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, @@ -20005,10 +15697,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20027,10 +15715,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20049,10 +15733,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20071,10 +15751,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20093,10 +15769,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20109,10 +15781,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -20125,10 +15793,6 @@ MTR_NEWLY_AVAILABLE - (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, @@ -20141,10 +15805,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20157,10 +15817,6 @@ MTR_NEWLY_AVAILABLE - (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 @@ -20173,10 +15829,6 @@ MTR_NEWLY_AVAILABLE - (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 72df3810579762..ae1b56fe6c2e1d 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 @@ -1178,47 +982,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 @@ -1247,14 +1024,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 @@ -1262,34 +1035,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 @@ -1320,14 +1069,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 @@ -1335,34 +1080,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 @@ -1392,48 +1113,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 @@ -1462,47 +1155,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 @@ -1531,47 +1197,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 @@ -2369,47 +2008,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 @@ -2438,47 +2050,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 @@ -2507,47 +2092,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 @@ -2576,47 +2134,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 @@ -2645,47 +2176,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 @@ -2714,47 +2218,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 @@ -2783,14 +2260,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 @@ -2798,34 +2271,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 @@ -2856,14 +2305,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 @@ -2871,34 +2316,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 @@ -2928,48 +2349,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 @@ -2998,47 +2391,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 @@ -3067,47 +2433,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 @@ -3915,47 +3254,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 @@ -3984,14 +3296,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 @@ -3999,33 +3307,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 @@ -4055,14 +3340,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 @@ -4106,33 +3387,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 @@ -4161,14 +3419,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 @@ -4212,33 +3466,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 @@ -4267,15 +3498,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 @@ -4324,35 +3550,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 @@ -4382,14 +3583,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 @@ -4397,34 +3594,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 @@ -4454,14 +3627,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 @@ -4469,34 +3638,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 @@ -4526,47 +3671,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 @@ -4595,47 +3713,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 @@ -4664,47 +3755,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 @@ -5265,47 +4329,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 @@ -5334,14 +4371,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 @@ -5385,33 +4418,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 @@ -5440,15 +4450,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 @@ -5456,36 +4462,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 @@ -5516,15 +4496,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 @@ -5532,36 +4508,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 @@ -5592,51 +4542,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 @@ -5666,47 +4585,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 @@ -5735,47 +4627,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 @@ -6442,47 +5307,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 @@ -6511,47 +5349,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 @@ -6580,47 +5391,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 @@ -6649,47 +5433,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 @@ -6718,47 +5475,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 @@ -6787,47 +5517,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 @@ -6856,47 +5559,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 @@ -6925,14 +5601,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 @@ -6976,33 +5648,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 @@ -7031,14 +5680,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 @@ -7083,33 +5728,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 @@ -7139,14 +5761,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 @@ -7195,33 +5813,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 @@ -7250,14 +5845,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 @@ -7306,33 +5897,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 @@ -7361,14 +5929,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 @@ -7417,33 +5981,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 @@ -7472,14 +6013,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 @@ -7528,33 +6065,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 @@ -7583,14 +6097,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 @@ -7640,33 +6150,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 @@ -7696,15 +6183,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 @@ -7712,35 +6194,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 @@ -7771,15 +6228,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 @@ -7787,35 +6239,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 @@ -7846,48 +6273,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 @@ -7916,47 +6315,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 @@ -7985,47 +6357,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 @@ -9021,14 +7366,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 @@ -9072,33 +7413,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 @@ -9127,14 +7445,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 @@ -9178,33 +7492,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 @@ -9233,14 +7524,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 @@ -9284,33 +7571,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 @@ -9339,14 +7603,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 @@ -9390,33 +7650,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 @@ -9445,47 +7682,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 @@ -9514,14 +7724,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 @@ -9565,33 +7771,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 @@ -9620,14 +7803,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 @@ -9671,33 +7850,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 @@ -9726,47 +7882,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 @@ -9795,47 +7924,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 @@ -9864,15 +7966,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 @@ -9880,36 +7977,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 @@ -9940,15 +8011,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 @@ -9956,36 +8022,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 @@ -10016,50 +8056,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 @@ -10089,47 +8099,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 @@ -10158,47 +8141,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 @@ -10918,48 +8874,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 @@ -10988,48 +8916,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 @@ -11058,48 +8958,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 @@ -11128,48 +9000,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 @@ -11198,15 +9042,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 @@ -11214,35 +9053,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 @@ -11273,15 +9087,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 @@ -11289,35 +9098,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 @@ -11348,48 +9132,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 @@ -11418,47 +9174,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 @@ -11487,47 +9216,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 @@ -11971,14 +9673,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 @@ -12059,33 +9756,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 @@ -12114,15 +9788,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 @@ -12130,35 +9799,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 @@ -12189,14 +9833,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 @@ -12204,34 +9844,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 @@ -12262,48 +9878,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 @@ -12332,47 +9920,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 @@ -12401,47 +9962,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 @@ -12770,14 +10304,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 @@ -12919,33 +10448,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 @@ -12976,14 +10482,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 @@ -13049,34 +10550,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 @@ -13106,14 +10583,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 @@ -13122,33 +10595,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 @@ -13179,14 +10629,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 @@ -13195,33 +10641,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 @@ -13252,14 +10675,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 @@ -13268,33 +10687,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 @@ -13324,15 +10720,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 @@ -13340,35 +10731,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 @@ -13399,15 +10765,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 @@ -13415,35 +10776,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 @@ -13474,48 +10810,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 @@ -13545,47 +10853,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 @@ -13614,47 +10895,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 @@ -14551,47 +11805,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 @@ -14620,48 +11847,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 @@ -14690,47 +11889,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 @@ -14759,15 +11931,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 @@ -14775,35 +11942,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 @@ -14834,14 +11976,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 @@ -14849,34 +11987,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 @@ -14907,48 +12021,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 @@ -14977,47 +12063,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 @@ -15046,47 +12105,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 @@ -15576,47 +12608,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 @@ -15645,47 +12650,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 @@ -15714,47 +12692,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 @@ -15783,47 +12734,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 @@ -15852,47 +12776,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 @@ -15921,14 +12818,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 @@ -15972,33 +12865,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 @@ -16027,14 +12897,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 @@ -16078,33 +12944,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 @@ -16133,47 +12976,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 @@ -16202,14 +13018,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 @@ -16217,33 +13029,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 @@ -16273,47 +13062,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 @@ -16342,14 +13104,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 @@ -16357,33 +13115,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 @@ -16413,47 +13148,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 @@ -16482,47 +13190,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 @@ -16551,47 +13232,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 @@ -16620,47 +13274,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 @@ -16689,47 +13316,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 @@ -16758,14 +13358,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 @@ -16810,33 +13406,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 @@ -16866,47 +13439,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 @@ -16935,47 +13481,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 @@ -17005,14 +13524,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 @@ -17020,34 +13536,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 @@ -17077,14 +13569,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 @@ -17092,34 +13580,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 @@ -17149,14 +13613,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 @@ -17164,34 +13624,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 @@ -17221,47 +13657,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 @@ -17290,47 +13699,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 @@ -17359,47 +13741,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 @@ -18706,15 +15061,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 @@ -18722,36 +15073,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 @@ -18782,15 +15107,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 @@ -18798,36 +15119,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 @@ -18858,51 +15153,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 @@ -18932,47 +15196,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 @@ -19001,47 +15238,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 @@ -19382,15 +15592,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 @@ -19458,36 +15663,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 @@ -19518,47 +15697,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 @@ -19587,53 +15739,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 @@ -19663,14 +15783,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 @@ -19678,33 +15794,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 @@ -19734,15 +15827,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 @@ -19750,36 +15839,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 @@ -19810,15 +15873,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 @@ -19826,36 +15885,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 @@ -19886,51 +15919,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 @@ -19960,47 +15963,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 @@ -20029,47 +16005,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 @@ -20538,14 +16487,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 @@ -20589,33 +16534,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 @@ -20644,51 +16566,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 @@ -20718,15 +16610,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 @@ -20734,36 +16622,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 @@ -20794,15 +16656,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 @@ -20810,36 +16668,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 @@ -20870,51 +16702,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 @@ -20944,47 +16745,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 @@ -21013,47 +16787,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 @@ -21424,15 +17171,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 @@ -21476,36 +17218,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 @@ -21535,15 +17251,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 @@ -21588,36 +17299,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 @@ -21648,15 +17333,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 @@ -21664,36 +17345,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 @@ -21724,15 +17379,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 @@ -21740,36 +17391,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 @@ -21800,15 +17425,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 @@ -21816,36 +17437,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 @@ -21876,51 +17471,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 @@ -21950,47 +17514,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 @@ -22019,47 +17556,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 @@ -22486,15 +17996,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 @@ -22538,35 +18043,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 @@ -22596,15 +18076,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 @@ -22612,36 +18087,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 @@ -22672,15 +18121,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 @@ -22688,36 +18132,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 @@ -22748,50 +18166,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 @@ -22821,47 +18209,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 @@ -22890,47 +18251,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 @@ -23258,50 +18592,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 @@ -23331,15 +18635,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 @@ -23347,36 +18647,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 @@ -23407,15 +18681,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 @@ -23423,36 +18693,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 @@ -23483,51 +18727,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 @@ -23557,47 +18770,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 @@ -23626,47 +18812,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 @@ -23981,50 +19140,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 @@ -24054,47 +19183,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 @@ -24123,47 +19225,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 @@ -24193,14 +19268,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 @@ -24208,33 +19279,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 @@ -24265,14 +19313,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 @@ -24280,33 +19324,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 @@ -24336,50 +19357,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 @@ -24409,14 +19400,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 @@ -24424,33 +19411,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 @@ -24480,14 +19444,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 @@ -24495,33 +19455,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 @@ -24551,14 +19488,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 @@ -24566,33 +19499,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 @@ -24622,47 +19532,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 @@ -24691,50 +19574,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 @@ -24764,47 +19617,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 @@ -24833,14 +19659,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 @@ -24848,33 +19670,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 @@ -24904,47 +19703,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 @@ -24973,50 +19745,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 @@ -25046,14 +19788,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 @@ -25061,33 +19799,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 @@ -25117,50 +19832,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 @@ -25190,47 +19875,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 @@ -25259,48 +19917,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 @@ -25331,14 +19961,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 @@ -25346,33 +19972,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 @@ -25402,14 +20005,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 @@ -25417,33 +20016,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 @@ -25473,14 +20049,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 @@ -25488,33 +20060,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 @@ -25544,47 +20093,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 @@ -25613,14 +20135,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 @@ -25628,33 +20146,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 @@ -25684,47 +20179,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 @@ -25753,47 +20221,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 @@ -25822,50 +20263,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 @@ -25895,14 +20306,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 @@ -25910,33 +20317,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 @@ -25967,14 +20351,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 @@ -25982,33 +20362,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 @@ -26038,14 +20395,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 @@ -26053,33 +20406,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 @@ -26109,15 +20439,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 @@ -26125,35 +20450,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 @@ -26184,15 +20484,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 @@ -26200,35 +20495,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 @@ -26259,15 +20529,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 @@ -26275,35 +20540,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 @@ -26334,48 +20574,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 @@ -26404,47 +20616,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 @@ -26473,47 +20658,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 @@ -28242,14 +22400,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 @@ -28293,33 +22447,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 @@ -28349,15 +22480,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 @@ -28366,36 +22493,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 @@ -28428,51 +22529,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 @@ -28502,15 +22573,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 @@ -28518,36 +22585,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 @@ -28579,14 +22620,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 @@ -28595,33 +22632,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 @@ -28651,15 +22665,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 @@ -28667,36 +22677,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 @@ -28727,15 +22711,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 @@ -28743,36 +22723,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 @@ -28803,50 +22757,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 @@ -28876,47 +22800,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 @@ -28945,47 +22842,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 @@ -29739,47 +23609,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 @@ -29808,50 +23651,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 @@ -29881,14 +23694,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 @@ -29896,33 +23705,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 @@ -29952,14 +23738,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 @@ -29967,33 +23749,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 @@ -30023,14 +23782,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 @@ -30074,33 +23829,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 @@ -30129,16 +23861,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 @@ -30146,37 +23873,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 @@ -30207,47 +23907,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 @@ -30276,14 +23949,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 @@ -30291,33 +23960,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 @@ -30347,15 +23993,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 @@ -30363,36 +24005,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 @@ -30423,15 +24039,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 @@ -30439,36 +24051,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 @@ -30499,50 +24085,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 @@ -30572,47 +24128,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 @@ -30641,47 +24170,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 @@ -31416,15 +24918,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 @@ -31432,36 +24929,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 @@ -31492,15 +24963,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 @@ -31508,35 +24974,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 @@ -31567,50 +25008,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 @@ -31640,47 +25051,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 @@ -31709,47 +25093,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 @@ -32064,51 +25421,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 @@ -32138,47 +25464,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 @@ -32207,47 +25506,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 @@ -32276,14 +25548,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 @@ -32291,33 +25559,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 @@ -32347,47 +25592,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 @@ -32416,15 +25634,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 @@ -32432,36 +25645,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 @@ -32492,51 +25679,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 @@ -32566,15 +25722,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 @@ -32582,36 +25733,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 @@ -32643,14 +25768,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 @@ -32658,33 +25779,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 @@ -32714,15 +25812,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 @@ -32730,36 +25823,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 @@ -32790,15 +25857,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 @@ -32806,36 +25868,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 @@ -32866,50 +25902,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 @@ -32939,47 +25945,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 @@ -33008,47 +25987,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 @@ -33754,50 +26706,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 @@ -33827,47 +26749,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 @@ -33896,47 +26791,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 @@ -33966,14 +26834,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 @@ -33981,33 +26845,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 @@ -34037,15 +26878,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 @@ -34053,36 +26890,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 @@ -34113,15 +26924,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 @@ -34129,36 +26935,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 @@ -34189,50 +26969,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 @@ -34262,47 +27012,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 @@ -34331,47 +27054,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 @@ -34862,47 +27558,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 @@ -34931,51 +27600,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 @@ -35005,47 +27644,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 @@ -35074,47 +27686,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 @@ -35143,47 +27728,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 @@ -35212,47 +27770,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 @@ -35281,47 +27812,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 @@ -35350,51 +27854,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 @@ -35424,51 +27898,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 @@ -35498,47 +27941,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 @@ -35567,47 +27983,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 @@ -35636,47 +28025,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 @@ -35705,47 +28067,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 @@ -35774,47 +28109,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 @@ -35843,47 +28151,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 @@ -35912,47 +28193,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 @@ -35981,47 +28235,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 @@ -36050,47 +28277,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 @@ -36119,14 +28319,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 @@ -36134,33 +28330,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 @@ -36191,14 +28364,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 @@ -36206,33 +28375,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 @@ -36263,14 +28409,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 @@ -36279,33 +28421,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 @@ -36335,47 +28454,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 @@ -36404,47 +28496,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 @@ -36473,47 +28538,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 @@ -36542,47 +28580,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 @@ -36611,14 +28622,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 @@ -36626,33 +28633,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 @@ -36682,47 +28666,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 @@ -36751,14 +28708,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 @@ -36766,33 +28719,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 @@ -36822,47 +28752,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 @@ -36891,47 +28794,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 @@ -36960,47 +28836,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 @@ -37029,14 +28878,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 @@ -37044,33 +28889,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 @@ -37100,47 +28922,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 @@ -37169,47 +28964,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 @@ -37239,14 +29007,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 @@ -37254,33 +29018,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 @@ -37311,14 +29052,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 @@ -37327,33 +29064,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 @@ -37383,47 +29097,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 @@ -37452,47 +29139,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 @@ -37521,14 +29181,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 @@ -37536,33 +29192,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 @@ -37592,47 +29225,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 @@ -37661,47 +29267,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 @@ -37730,47 +29309,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 @@ -37799,47 +29351,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 @@ -37868,47 +29393,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 @@ -37937,47 +29435,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 @@ -38006,14 +29477,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 @@ -38021,33 +29488,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 @@ -38077,47 +29521,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 @@ -38147,14 +29564,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 @@ -38162,33 +29575,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 @@ -38219,14 +29609,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 @@ -38234,33 +29620,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 @@ -38290,47 +29653,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 @@ -38359,47 +29695,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 @@ -38429,14 +29738,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 @@ -38444,33 +29749,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 @@ -38501,14 +29783,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 @@ -38516,33 +29794,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 @@ -38572,47 +29827,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 @@ -38641,47 +29869,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 @@ -38710,47 +29911,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 @@ -38779,47 +29953,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 @@ -38848,47 +29995,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 @@ -38917,47 +30037,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 @@ -38987,15 +30080,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 @@ -39003,36 +30092,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 @@ -39063,47 +30126,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 @@ -39134,16 +30170,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) @@ -39154,38 +30185,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) @@ -39220,16 +30223,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 @@ -39237,37 +30235,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 @@ -39298,15 +30269,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 @@ -39314,36 +30281,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 @@ -39374,15 +30315,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 @@ -39390,36 +30327,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 @@ -39450,51 +30361,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 @@ -39524,47 +30404,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 @@ -39593,47 +30446,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 @@ -42746,47 +33572,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 @@ -42815,51 +33614,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 @@ -42889,53 +33658,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 @@ -42965,47 +33702,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 @@ -43034,47 +33744,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 @@ -43103,47 +33786,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 @@ -43172,47 +33828,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 @@ -43242,14 +33871,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 @@ -43257,33 +33882,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 @@ -43314,14 +33916,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 @@ -43329,33 +33927,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 @@ -43385,14 +33960,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 @@ -43400,33 +33971,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 @@ -43456,14 +34004,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 @@ -43471,33 +34015,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 @@ -43527,47 +34048,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 @@ -43596,47 +34090,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 @@ -43665,15 +34132,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 @@ -43681,36 +34144,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 @@ -43741,15 +34178,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 @@ -43757,36 +34190,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 @@ -43817,51 +34224,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 @@ -43891,47 +34267,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 @@ -43960,47 +34309,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 @@ -44882,53 +35204,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 @@ -44958,47 +35248,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 @@ -45027,47 +35290,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 @@ -45096,47 +35332,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 @@ -45165,47 +35374,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 @@ -45234,47 +35416,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 @@ -45303,47 +35458,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 @@ -45372,47 +35500,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 @@ -45441,47 +35542,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 @@ -45510,15 +35584,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 @@ -45526,36 +35596,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 @@ -45586,15 +35630,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 @@ -45602,36 +35642,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 @@ -45662,51 +35676,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 @@ -45736,47 +35720,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 @@ -45805,47 +35762,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 @@ -46517,47 +36447,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 @@ -46586,47 +36489,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 @@ -46655,47 +36531,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 @@ -46724,14 +36573,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 @@ -46775,33 +36620,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 @@ -46830,47 +36652,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 @@ -46899,14 +36694,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 @@ -46914,33 +36705,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 @@ -46970,47 +36738,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 @@ -47039,14 +36780,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 @@ -47054,33 +36791,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 @@ -47110,47 +36824,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 @@ -47179,47 +36866,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 @@ -47248,47 +36908,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 @@ -47317,47 +36950,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 @@ -47386,47 +36992,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 @@ -47455,47 +37034,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 @@ -47524,47 +37076,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 @@ -47593,15 +37118,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 @@ -47609,36 +37129,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 @@ -47669,15 +37163,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 @@ -47685,36 +37174,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 @@ -47745,50 +37208,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 @@ -47818,47 +37251,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 @@ -47887,47 +37293,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 @@ -48857,47 +38236,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 @@ -48926,47 +38278,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 @@ -48995,47 +38320,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 @@ -49064,14 +38362,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 @@ -49079,34 +38373,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 @@ -49137,14 +38407,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 @@ -49152,34 +38418,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 @@ -49209,48 +38451,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 @@ -49279,47 +38493,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 @@ -49348,47 +38535,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 @@ -49895,54 +39055,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 @@ -49972,47 +39099,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 @@ -50041,47 +39141,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 @@ -50110,15 +39183,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 @@ -50126,36 +39195,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 @@ -50186,15 +39229,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 @@ -50202,36 +39241,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 @@ -50262,51 +39275,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 @@ -50336,47 +39319,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 @@ -50405,47 +39361,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 @@ -51098,48 +40027,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 @@ -51171,50 +40071,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 @@ -51244,47 +40113,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 @@ -51313,14 +40155,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 @@ -51328,33 +40166,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 @@ -51385,15 +40200,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 @@ -51401,36 +40212,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 @@ -51461,14 +40246,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 @@ -51476,33 +40257,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 @@ -51532,15 +40290,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 @@ -51548,36 +40302,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 @@ -51608,15 +40336,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 @@ -51624,36 +40348,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 @@ -51684,51 +40382,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 @@ -51758,47 +40425,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 @@ -51827,47 +40467,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 @@ -52656,15 +41269,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 @@ -52731,35 +41338,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 @@ -52791,50 +41373,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 @@ -52864,14 +41415,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 @@ -52879,33 +41426,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 @@ -52935,14 +41459,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 @@ -52950,33 +41470,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 @@ -53006,15 +41503,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 @@ -53022,36 +41514,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 @@ -53082,15 +41548,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 @@ -53098,36 +41559,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 @@ -53158,50 +41593,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 @@ -53231,47 +41636,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 @@ -53300,47 +41678,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 @@ -53833,48 +42184,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 @@ -53903,15 +42226,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 @@ -53919,35 +42237,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 @@ -53978,15 +42271,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 @@ -53994,35 +42282,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 @@ -54053,48 +42316,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 @@ -54123,47 +42358,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 @@ -54192,47 +42400,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 @@ -54548,14 +42729,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 @@ -54621,33 +42798,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 @@ -54676,15 +42830,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 @@ -54692,35 +42841,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 @@ -54751,15 +42875,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 @@ -54767,35 +42886,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 @@ -54826,48 +42920,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 @@ -54896,47 +42962,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 @@ -54965,47 +43004,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 @@ -55331,47 +43343,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 @@ -55400,15 +43385,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 @@ -55416,35 +43396,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 @@ -55475,15 +43430,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 @@ -55491,35 +43441,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 @@ -55550,48 +43475,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 @@ -55620,47 +43517,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 @@ -55689,47 +43559,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 @@ -56072,47 +43915,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 @@ -56141,47 +43957,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 @@ -56210,48 +43999,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 @@ -56280,47 +44041,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 @@ -56349,14 +44083,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 @@ -56405,33 +44135,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 @@ -56460,14 +44167,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 @@ -56516,33 +44219,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 @@ -56571,15 +44251,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 @@ -56587,35 +44262,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 @@ -56646,15 +44296,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 @@ -56662,35 +44307,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 @@ -56721,48 +44341,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 @@ -56791,47 +44383,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 @@ -56860,47 +44425,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 @@ -58059,50 +45597,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 @@ -58132,48 +45640,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 @@ -58202,47 +45682,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 @@ -58271,50 +45724,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 @@ -58344,14 +45767,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 @@ -58395,33 +45814,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 @@ -58450,14 +45846,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 @@ -58501,33 +45893,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 @@ -58556,14 +45925,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 @@ -58607,33 +45972,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 @@ -58663,14 +46005,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 @@ -58678,33 +46016,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 @@ -58735,14 +46050,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 @@ -58750,33 +46061,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 @@ -58807,14 +46095,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 @@ -58822,33 +46106,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 @@ -58879,14 +46140,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 @@ -58895,33 +46152,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: @@ -58953,14 +46187,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 @@ -58969,33 +46199,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: @@ -59027,14 +46234,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 @@ -59043,33 +46246,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 @@ -59099,47 +46279,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 @@ -59168,47 +46321,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 @@ -59237,47 +46363,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 @@ -59306,47 +46405,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 @@ -59376,14 +46448,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 @@ -59391,34 +46459,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 @@ -59450,14 +46494,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 @@ -59466,33 +46506,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 @@ -59522,14 +46539,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 @@ -59573,33 +46586,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 @@ -59628,14 +46618,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 @@ -59679,33 +46665,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 @@ -59734,14 +46697,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 @@ -59785,33 +46744,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 @@ -59840,14 +46776,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 @@ -59891,33 +46823,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 @@ -59946,14 +46855,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 @@ -59997,34 +46902,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 @@ -60055,15 +46936,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 @@ -60071,35 +46947,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 @@ -60131,15 +46982,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 @@ -60148,35 +46994,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 @@ -60208,14 +47029,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 @@ -60260,33 +47077,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 @@ -60316,14 +47110,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 @@ -60368,33 +47158,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 @@ -60424,14 +47191,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 @@ -60476,33 +47239,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 @@ -60533,14 +47273,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 @@ -60585,33 +47321,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 @@ -60642,15 +47355,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 @@ -60695,35 +47403,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 @@ -60754,14 +47437,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 @@ -60806,33 +47485,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 @@ -60863,14 +47519,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 @@ -60916,33 +47568,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 @@ -60972,14 +47601,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 @@ -61023,33 +47648,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 @@ -61079,14 +47681,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 @@ -61132,33 +47730,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 @@ -61188,14 +47763,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 @@ -61240,33 +47811,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 @@ -61296,15 +47844,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 @@ -61312,35 +47855,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 @@ -61371,15 +47889,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 @@ -61387,35 +47900,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 @@ -61446,48 +47934,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 @@ -61516,47 +47976,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 @@ -61585,47 +48018,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 @@ -64018,48 +50424,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 @@ -64089,14 +50467,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 @@ -64104,33 +50478,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 @@ -64161,14 +50512,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 @@ -64176,33 +50523,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 @@ -64232,14 +50556,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 @@ -64247,33 +50567,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 @@ -64303,14 +50600,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 @@ -64318,33 +50611,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 @@ -64375,14 +50645,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 @@ -64390,33 +50656,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 @@ -64447,14 +50690,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 @@ -64462,33 +50701,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 @@ -64518,48 +50734,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 @@ -64589,14 +50777,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 @@ -64605,33 +50789,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 @@ -64662,14 +50823,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 @@ -64678,33 +50835,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 @@ -64734,50 +50868,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 @@ -64808,14 +50912,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 @@ -64824,33 +50924,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 @@ -64881,14 +50958,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 @@ -64897,33 +50970,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 @@ -64953,50 +51003,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 @@ -65027,14 +51047,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 @@ -65043,33 +51059,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 @@ -65100,14 +51093,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 @@ -65116,33 +51105,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 @@ -65173,14 +51139,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 @@ -65188,33 +51150,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 @@ -65245,14 +51184,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 @@ -65260,33 +51195,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 @@ -65317,14 +51229,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 @@ -65332,33 +51240,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 @@ -65389,14 +51274,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 @@ -65404,33 +51285,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 @@ -65460,14 +51318,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 @@ -65511,33 +51365,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 @@ -65566,48 +51397,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 @@ -65636,15 +51439,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 @@ -65652,36 +51450,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 @@ -65712,15 +51484,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 @@ -65728,35 +51495,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 @@ -65787,50 +51529,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 @@ -65860,47 +51572,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 @@ -65929,47 +51614,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 @@ -67337,14 +52995,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 @@ -67352,33 +53006,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 @@ -67408,14 +53039,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 @@ -67423,33 +53050,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 @@ -67479,14 +53083,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 @@ -67494,33 +53094,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 @@ -67550,14 +53127,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 @@ -67601,33 +53174,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 @@ -67656,14 +53206,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 @@ -67708,33 +53254,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 @@ -67765,14 +53288,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 @@ -67817,33 +53336,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 @@ -67874,14 +53370,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 @@ -67926,33 +53418,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 @@ -67982,14 +53451,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 @@ -68033,33 +53498,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 @@ -68088,14 +53530,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 @@ -68140,33 +53578,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 @@ -68196,47 +53611,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 @@ -68265,15 +53653,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 @@ -68281,36 +53664,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 @@ -68341,15 +53698,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 @@ -68357,35 +53709,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 @@ -68416,50 +53743,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 @@ -68489,47 +53786,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 @@ -68558,47 +53828,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 @@ -69400,47 +54643,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 @@ -69469,47 +54685,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 @@ -69538,47 +54727,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 @@ -69607,47 +54769,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 @@ -69676,47 +54811,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 @@ -69745,47 +54853,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 @@ -69814,47 +54895,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 @@ -69883,47 +54937,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 @@ -69952,47 +54979,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 @@ -70021,47 +55021,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 @@ -70090,47 +55063,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 @@ -70159,47 +55105,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 @@ -70228,47 +55147,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 @@ -70297,50 +55189,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 @@ -70371,16 +55233,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 @@ -70388,37 +55245,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 @@ -70449,15 +55279,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 @@ -70465,36 +55291,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 @@ -70525,47 +55325,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 @@ -70594,47 +55367,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 @@ -70663,14 +55409,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 @@ -70720,33 +55462,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 @@ -70776,47 +55495,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 @@ -70846,14 +55538,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 @@ -70903,33 +55591,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 @@ -70959,16 +55624,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 @@ -71012,37 +55672,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 @@ -71072,15 +55705,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 @@ -71124,36 +55753,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 @@ -71183,16 +55786,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 @@ -71200,37 +55798,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 @@ -71261,15 +55832,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 @@ -71277,36 +55844,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 @@ -71337,51 +55878,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 @@ -71411,47 +55922,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 @@ -71480,47 +55964,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 @@ -72985,47 +57442,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 @@ -73054,14 +57484,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 @@ -73069,33 +57495,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 @@ -73125,47 +57528,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 @@ -73195,14 +57571,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 @@ -73210,33 +57582,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 @@ -73267,14 +57616,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 @@ -73282,33 +57627,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 @@ -73339,14 +57661,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 @@ -73354,33 +57672,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 @@ -73411,14 +57706,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 @@ -73426,33 +57717,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 @@ -73482,47 +57750,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 @@ -73551,47 +57792,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 @@ -73621,14 +57835,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 @@ -73673,33 +57883,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 @@ -73730,14 +57917,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 @@ -73782,33 +57965,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 @@ -73839,14 +57999,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 @@ -73891,33 +58047,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 @@ -73948,14 +58081,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 @@ -74000,33 +58129,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 @@ -74057,14 +58163,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 @@ -74109,33 +58211,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 @@ -74166,14 +58245,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 @@ -74218,33 +58293,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 @@ -74274,14 +58326,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 @@ -74326,33 +58374,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 @@ -74382,14 +58407,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 @@ -74434,33 +58455,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 @@ -74490,14 +58488,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 @@ -74542,33 +58536,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 @@ -74598,14 +58569,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 @@ -74650,33 +58617,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 @@ -74706,14 +58650,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 @@ -74758,33 +58698,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 @@ -74814,14 +58731,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 @@ -74865,33 +58778,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 @@ -74921,15 +58811,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 @@ -74974,36 +58860,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 @@ -75034,14 +58894,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 @@ -75085,33 +58941,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 @@ -75140,14 +58973,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 @@ -75155,33 +58984,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 @@ -75211,47 +59017,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 @@ -75281,14 +59060,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 @@ -75296,33 +59071,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 @@ -75353,14 +59105,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 @@ -75368,33 +59116,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 @@ -75425,14 +59150,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 @@ -75477,33 +59198,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 @@ -75534,14 +59232,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 @@ -75593,33 +59287,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 @@ -75650,14 +59321,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 @@ -75704,33 +59371,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 @@ -75761,14 +59405,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 @@ -75776,33 +59416,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 @@ -75832,14 +59449,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 @@ -75847,33 +59460,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 @@ -75903,14 +59493,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 @@ -75918,33 +59504,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 @@ -75975,14 +59538,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 @@ -75991,33 +59550,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 @@ -76047,14 +59583,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 @@ -76103,33 +59635,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 @@ -76158,14 +59667,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 @@ -76173,33 +59678,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 @@ -76229,14 +59711,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 @@ -76244,33 +59722,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 @@ -76300,14 +59755,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 @@ -76356,33 +59807,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 @@ -76411,14 +59839,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 @@ -76426,33 +59850,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 @@ -76482,14 +59883,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 @@ -76497,33 +59894,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 @@ -76553,14 +59927,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 @@ -76605,33 +59975,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 @@ -76661,14 +60008,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 @@ -76712,33 +60055,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 @@ -76767,14 +60087,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 @@ -76818,33 +60134,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 @@ -76873,14 +60166,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 @@ -76924,33 +60213,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 @@ -76979,14 +60245,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 @@ -77030,33 +60292,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 @@ -77085,14 +60324,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 @@ -77136,33 +60371,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 @@ -77191,14 +60403,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 @@ -77242,33 +60450,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 @@ -77297,47 +60482,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 @@ -77366,14 +60524,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 @@ -77417,33 +60571,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 @@ -77472,15 +60603,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 @@ -77488,35 +60614,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 @@ -77547,15 +60648,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 @@ -77563,35 +60659,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 @@ -77622,48 +60693,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 @@ -77692,47 +60735,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 @@ -77761,47 +60777,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 @@ -80574,14 +63563,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 @@ -80625,34 +63610,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 @@ -80681,15 +63642,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 @@ -80733,35 +63689,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 @@ -80791,14 +63722,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 @@ -80847,33 +63774,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 @@ -80902,47 +63806,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 @@ -80971,47 +63848,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 @@ -81040,14 +63890,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 @@ -81096,33 +63942,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 @@ -81151,47 +63974,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 @@ -81220,47 +64016,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 @@ -81289,14 +64058,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 @@ -81340,33 +64105,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 @@ -81395,47 +64137,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 @@ -81464,14 +64179,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 @@ -81515,33 +64226,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 @@ -81570,15 +64258,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 @@ -81586,35 +64269,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 @@ -81645,15 +64303,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 @@ -81661,35 +64314,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 @@ -81720,48 +64348,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 @@ -81790,47 +64390,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 @@ -81859,47 +64432,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 @@ -82707,14 +65253,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 @@ -82759,33 +65301,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 @@ -82815,14 +65334,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 @@ -82866,33 +65381,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 @@ -82922,14 +65414,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 @@ -82975,33 +65463,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 @@ -83031,16 +65496,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 @@ -83048,38 +65508,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 @@ -83110,16 +65542,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 @@ -83127,38 +65554,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 @@ -83189,54 +65588,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 @@ -83266,47 +65632,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 @@ -83335,47 +65674,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 @@ -84410,47 +66722,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 @@ -84479,47 +66764,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 @@ -84548,47 +66806,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 @@ -84617,47 +66848,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 @@ -84686,47 +66890,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 @@ -84755,47 +66932,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 @@ -84824,47 +66974,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 @@ -84894,14 +67017,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 @@ -84909,33 +67028,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 @@ -84965,47 +67061,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 @@ -85034,14 +67103,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 @@ -85085,33 +67150,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 @@ -85140,47 +67182,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 @@ -85209,47 +67224,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 @@ -85278,47 +67266,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 @@ -85347,47 +67308,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 @@ -85416,47 +67350,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 @@ -85485,47 +67392,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 @@ -85554,47 +67434,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 @@ -85623,47 +67476,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 @@ -85692,47 +67518,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 @@ -85761,47 +67560,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 @@ -85830,47 +67602,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 @@ -85899,47 +67644,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 @@ -85968,47 +67686,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 @@ -86037,47 +67728,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 @@ -86106,47 +67770,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 @@ -86175,47 +67812,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 @@ -86244,47 +67854,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 @@ -86313,47 +67896,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 @@ -86382,47 +67938,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 @@ -86451,14 +67980,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 @@ -86502,33 +68027,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 @@ -86557,14 +68059,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 @@ -86608,33 +68106,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 @@ -86663,14 +68138,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 @@ -86714,33 +68185,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 @@ -86769,14 +68217,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 @@ -86820,33 +68264,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 @@ -86875,14 +68296,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 @@ -86932,33 +68349,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 @@ -86988,14 +68382,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 @@ -87039,33 +68429,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 @@ -87094,14 +68461,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 @@ -87145,33 +68508,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 @@ -87200,14 +68540,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 @@ -87257,33 +68593,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 @@ -87313,14 +68626,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 @@ -87364,33 +68673,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 @@ -87419,14 +68705,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 @@ -87470,33 +68752,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 @@ -87525,14 +68784,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 @@ -87582,33 +68837,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 @@ -87638,14 +68870,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 @@ -87653,33 +68881,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 @@ -87709,47 +68914,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 @@ -87778,47 +68956,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 @@ -87847,14 +68998,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 @@ -87862,33 +69009,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 @@ -87918,47 +69042,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 @@ -87988,14 +69085,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 @@ -88003,33 +69096,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 @@ -88060,14 +69130,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 @@ -88075,33 +69141,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 @@ -88131,47 +69174,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 @@ -88201,14 +69217,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 @@ -88216,33 +69228,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 @@ -88273,14 +69262,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 @@ -88288,33 +69273,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 @@ -88345,14 +69307,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 @@ -88361,33 +69319,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 @@ -88418,14 +69353,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 @@ -88476,33 +69407,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 @@ -88532,15 +69440,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 @@ -88548,35 +69451,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 @@ -88607,15 +69485,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 @@ -88623,35 +69496,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 @@ -88682,48 +69530,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 @@ -88752,47 +69572,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 @@ -88821,47 +69614,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 @@ -91628,47 +72394,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 @@ -91697,47 +72436,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 @@ -91766,47 +72478,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 @@ -91835,14 +72520,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 @@ -91886,33 +72567,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 @@ -91941,14 +72599,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 @@ -91992,33 +72646,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 @@ -92048,14 +72679,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 @@ -92105,33 +72732,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 @@ -92162,14 +72766,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 @@ -92219,33 +72819,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 @@ -92275,47 +72852,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 @@ -92344,14 +72894,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 @@ -92395,33 +72941,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 @@ -92450,14 +72973,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 @@ -92501,33 +73020,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 @@ -92556,14 +73052,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 @@ -92612,33 +73104,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 @@ -92667,14 +73136,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 @@ -92723,33 +73188,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 @@ -92778,14 +73220,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 @@ -92829,33 +73267,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 @@ -92885,14 +73300,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 @@ -92942,33 +73353,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 @@ -92998,15 +73386,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 @@ -93014,36 +73398,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 @@ -93074,15 +73432,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 @@ -93090,36 +73444,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 @@ -93150,50 +73478,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 @@ -93223,47 +73521,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 @@ -93292,47 +73563,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 @@ -94321,47 +74565,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 @@ -94390,47 +74607,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 @@ -94459,47 +74649,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 @@ -94528,47 +74691,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 @@ -94597,47 +74733,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 @@ -94666,15 +74775,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 @@ -94682,36 +74787,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 @@ -94742,15 +74821,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 @@ -94758,36 +74833,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 @@ -94818,51 +74867,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 @@ -94892,47 +74910,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 @@ -94961,47 +74952,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 @@ -95493,47 +75457,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 @@ -95562,47 +75499,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 @@ -95631,47 +75541,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 @@ -95700,47 +75583,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 @@ -95769,15 +75625,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 @@ -95785,36 +75637,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 @@ -95845,15 +75671,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 @@ -95861,36 +75683,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 @@ -95921,51 +75717,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 @@ -95995,47 +75760,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 @@ -96064,47 +75802,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 @@ -96552,47 +76263,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 @@ -96621,47 +76305,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 @@ -96690,47 +76347,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 @@ -96759,47 +76389,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 @@ -96828,47 +76431,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 @@ -96897,47 +76473,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 @@ -96966,47 +76515,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 @@ -97035,47 +76557,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 @@ -97104,47 +76599,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 @@ -97173,15 +76641,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 @@ -97189,36 +76653,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 @@ -97249,15 +76687,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 @@ -97265,36 +76698,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 @@ -97325,50 +76732,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 @@ -97398,47 +76775,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 @@ -97467,47 +76817,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 @@ -98171,47 +77494,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 @@ -98240,47 +77536,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 @@ -98309,47 +77578,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 @@ -98378,47 +77620,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 @@ -98447,15 +77662,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 @@ -98463,36 +77673,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 @@ -98523,15 +77707,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 @@ -98539,36 +77718,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 @@ -98599,50 +77752,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 @@ -98672,47 +77795,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 @@ -98741,47 +77837,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 @@ -99229,47 +78298,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 @@ -99298,47 +78340,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 @@ -99367,47 +78382,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 @@ -99436,47 +78424,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 @@ -99505,16 +78466,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 @@ -99522,37 +78478,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 @@ -99583,15 +78512,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 @@ -99599,36 +78524,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 @@ -99659,51 +78558,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 @@ -99733,47 +78602,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 @@ -99802,47 +78644,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 @@ -100290,47 +79105,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 @@ -100359,14 +79147,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 @@ -100374,33 +79158,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 @@ -100431,14 +79192,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 @@ -100446,33 +79203,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 @@ -100503,14 +79237,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 @@ -100556,33 +79286,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 @@ -100613,14 +79320,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 @@ -100666,33 +79369,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 @@ -100723,14 +79403,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 @@ -100777,33 +79453,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 @@ -100834,14 +79487,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 @@ -100888,33 +79537,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 @@ -100945,14 +79571,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 @@ -100999,33 +79621,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 @@ -101056,14 +79655,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 @@ -101112,33 +79707,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 @@ -101169,14 +79741,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 @@ -101225,33 +79793,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: @@ -101283,14 +79828,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 @@ -101339,33 +79880,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: @@ -101397,14 +79915,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 @@ -101453,33 +79967,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: @@ -101510,15 +80001,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 @@ -101526,36 +80012,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 @@ -101586,15 +80046,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 @@ -101602,36 +80057,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 @@ -101662,50 +80091,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 @@ -101735,47 +80134,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 @@ -101804,47 +80176,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 @@ -102777,47 +81122,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 @@ -102846,15 +81164,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 @@ -102862,35 +81175,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 @@ -102921,15 +81209,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 @@ -102937,35 +81220,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 @@ -102996,48 +81254,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 @@ -103066,47 +81296,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 @@ -103135,47 +81338,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 @@ -103572,47 +81748,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 @@ -103642,14 +81791,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 @@ -103657,33 +81802,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 @@ -103714,14 +81836,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 @@ -103729,34 +81848,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 @@ -103786,15 +81881,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 @@ -103802,35 +81892,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 @@ -103861,14 +81926,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 @@ -103876,34 +81937,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 @@ -103934,48 +81971,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 @@ -104004,47 +82013,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 @@ -104073,47 +82055,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 @@ -104568,48 +82523,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 @@ -104638,47 +82565,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 @@ -104707,15 +82607,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 @@ -104723,36 +82618,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 @@ -104783,15 +82652,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 @@ -104799,36 +82663,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 @@ -104859,50 +82697,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 @@ -104932,47 +82740,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 @@ -105001,47 +82782,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 @@ -105731,50 +83485,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 @@ -105804,47 +83528,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 @@ -105873,47 +83570,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 @@ -105943,15 +83613,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 @@ -105959,35 +83625,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 @@ -106018,47 +83659,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 @@ -106087,47 +83701,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 @@ -106156,47 +83743,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 @@ -106225,15 +83785,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 @@ -106241,35 +83796,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 @@ -106300,15 +83830,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 @@ -106316,35 +83841,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 @@ -106375,48 +83875,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 @@ -106446,47 +83918,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 @@ -106515,47 +83960,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 @@ -107403,48 +84821,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 @@ -107473,47 +84863,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 @@ -107542,15 +84905,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 @@ -107558,35 +84916,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 @@ -107617,15 +84950,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 @@ -107633,35 +84961,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 @@ -107692,48 +84995,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 @@ -107762,47 +85037,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 @@ -107831,47 +85079,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 @@ -108289,15 +85510,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 @@ -108305,35 +85521,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 @@ -108364,15 +85555,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 @@ -108380,35 +85566,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 @@ -108439,48 +85600,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 @@ -108509,47 +85642,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 @@ -108578,47 +85684,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 @@ -108926,15 +86005,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 @@ -108942,35 +86016,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 @@ -109001,15 +86050,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 @@ -109017,35 +86061,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 @@ -109076,48 +86095,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 @@ -109146,47 +86137,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 @@ -109215,47 +86179,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 @@ -109746,50 +86683,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 @@ -109820,14 +86727,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 @@ -109872,33 +86775,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 @@ -109928,15 +86808,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 @@ -109944,36 +86819,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 @@ -110004,15 +86853,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 @@ -110020,36 +86864,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 @@ -110080,50 +86898,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 @@ -110153,47 +86941,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 @@ -110222,47 +86983,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 @@ -110711,48 +87445,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 @@ -110781,47 +87487,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 @@ -110850,15 +87529,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 @@ -110866,35 +87540,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 @@ -110925,15 +87574,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 @@ -110941,35 +87585,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 @@ -111000,48 +87619,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 @@ -111070,47 +87661,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 @@ -111139,47 +87703,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 @@ -111635,50 +88172,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 @@ -111709,15 +88216,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 @@ -111775,35 +88278,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 @@ -111834,15 +88312,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 @@ -111850,36 +88324,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 @@ -111910,15 +88358,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 @@ -111926,36 +88369,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 @@ -111986,50 +88403,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 @@ -112059,47 +88446,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 @@ -112128,47 +88488,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 @@ -112574,47 +88907,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 @@ -112643,47 +88949,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 @@ -112712,47 +88991,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 @@ -112781,47 +89033,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 @@ -112851,15 +89076,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 @@ -112867,35 +89088,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 @@ -112927,51 +89123,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 @@ -113001,14 +89167,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 @@ -113016,33 +89178,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 @@ -113072,50 +89211,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 @@ -113145,15 +89254,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 @@ -113161,36 +89265,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 @@ -113221,15 +89299,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 @@ -113237,36 +89310,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 @@ -113297,50 +89344,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 @@ -113370,47 +89387,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 @@ -113439,47 +89429,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 @@ -114198,15 +90161,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 @@ -114214,35 +90172,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 @@ -114273,15 +90206,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 @@ -114289,35 +90217,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 @@ -114348,48 +90251,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 @@ -114418,47 +90293,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 @@ -114487,47 +90335,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 @@ -114886,47 +90707,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 @@ -114955,47 +90749,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 @@ -115024,47 +90791,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 @@ -115093,47 +90833,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 @@ -115162,47 +90875,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 @@ -115231,47 +90917,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 @@ -115300,47 +90959,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 @@ -115369,47 +91001,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 @@ -115438,47 +91043,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 @@ -115507,47 +91085,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 @@ -115576,14 +91127,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 @@ -115591,33 +91138,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 @@ -115647,47 +91171,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 @@ -115716,14 +91213,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 @@ -115731,33 +91224,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 @@ -115787,47 +91257,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 @@ -115856,47 +91299,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 @@ -115925,47 +91341,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 @@ -115994,47 +91383,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 @@ -116063,47 +91425,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 @@ -116132,47 +91467,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 @@ -116201,47 +91509,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 @@ -116270,47 +91551,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 @@ -116339,14 +91593,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 @@ -116354,33 +91604,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 @@ -116410,14 +91637,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 @@ -116425,33 +91648,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 @@ -116482,14 +91682,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 @@ -116497,33 +91693,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 @@ -116554,14 +91727,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 @@ -116569,33 +91738,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 @@ -116626,14 +91772,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 @@ -116641,33 +91783,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 @@ -116698,14 +91817,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 @@ -116713,33 +91828,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 @@ -116770,14 +91862,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 @@ -116785,33 +91873,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 @@ -116842,14 +91907,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 @@ -116857,33 +91918,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 @@ -116914,14 +91952,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 @@ -116930,33 +91964,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 @@ -116987,14 +91998,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 @@ -117003,33 +92010,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 @@ -117060,14 +92044,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 @@ -117076,33 +92056,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 @@ -117133,14 +92090,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 @@ -117149,33 +92102,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 @@ -117206,14 +92136,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 @@ -117222,33 +92148,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 @@ -117279,14 +92182,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 @@ -117295,33 +92194,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 @@ -117351,14 +92227,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 @@ -117366,33 +92238,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 @@ -117422,14 +92271,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 @@ -117437,33 +92282,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 @@ -117493,47 +92315,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 @@ -117562,47 +92357,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 @@ -117632,14 +92400,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 @@ -117647,33 +92411,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 @@ -117704,14 +92445,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 @@ -117720,33 +92457,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 @@ -117776,14 +92490,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 @@ -117791,33 +92501,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 @@ -117848,14 +92535,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 @@ -117863,33 +92546,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 @@ -117920,14 +92580,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 @@ -117935,33 +92591,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 @@ -117992,14 +92625,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 @@ -118008,33 +92637,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 @@ -118064,14 +92670,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 @@ -118079,33 +92681,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 @@ -118135,47 +92714,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 @@ -118204,47 +92756,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 @@ -118273,47 +92798,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 @@ -118342,47 +92840,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 @@ -118411,47 +92882,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 @@ -118480,47 +92924,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 @@ -118549,47 +92966,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 @@ -118618,47 +93008,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 @@ -118687,47 +93050,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 @@ -118756,47 +93092,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 @@ -118825,47 +93134,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 @@ -118894,47 +93176,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 @@ -118964,14 +93219,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 @@ -119018,33 +93269,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 @@ -119075,14 +93303,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 @@ -119128,33 +93352,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 @@ -119185,14 +93386,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 @@ -119237,33 +93434,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 @@ -119294,14 +93468,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 @@ -119347,33 +93517,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 @@ -119403,14 +93550,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 @@ -119455,33 +93598,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 @@ -119511,14 +93631,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 @@ -119563,33 +93679,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 @@ -119619,14 +93712,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 @@ -119634,33 +93723,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 @@ -119690,47 +93756,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 @@ -119759,14 +93798,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 @@ -119774,33 +93809,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 @@ -119830,47 +93842,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 @@ -119899,47 +93884,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 @@ -119968,47 +93926,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 @@ -120037,14 +93968,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 @@ -120089,33 +94016,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 @@ -120145,47 +94049,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 @@ -120214,47 +94091,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 @@ -120283,14 +94133,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 @@ -120335,33 +94181,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 @@ -120391,47 +94214,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 @@ -120460,47 +94256,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 @@ -120529,14 +94298,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 @@ -120544,33 +94309,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 @@ -120601,14 +94343,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 @@ -120616,33 +94354,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 @@ -120672,14 +94387,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 @@ -120687,33 +94398,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 @@ -120744,14 +94432,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 @@ -120759,33 +94443,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 @@ -120815,14 +94476,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 @@ -120830,33 +94487,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 @@ -120887,14 +94521,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 @@ -120902,33 +94532,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 @@ -120958,47 +94565,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 @@ -121027,47 +94607,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 @@ -121096,47 +94649,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 @@ -121165,14 +94691,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 @@ -121180,33 +94702,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 @@ -121236,14 +94735,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 @@ -121251,33 +94746,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 @@ -121307,47 +94779,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 @@ -121376,14 +94821,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 @@ -121391,33 +94832,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 @@ -121447,14 +94865,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 @@ -121462,33 +94876,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 @@ -121518,47 +94909,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 @@ -121587,14 +94951,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 @@ -121602,33 +94962,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 @@ -121658,14 +94995,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 @@ -121673,33 +95006,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 @@ -121729,47 +95039,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 @@ -121798,14 +95081,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 @@ -121813,33 +95092,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 @@ -121869,14 +95125,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 @@ -121884,33 +95136,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 @@ -121940,14 +95169,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 @@ -121955,33 +95180,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 @@ -122011,14 +95213,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 @@ -122026,33 +95224,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 @@ -122082,47 +95257,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 @@ -122152,14 +95300,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 @@ -122168,33 +95312,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: @@ -122226,14 +95347,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 @@ -122242,33 +95359,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 @@ -122299,14 +95393,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 @@ -122315,33 +95405,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 @@ -122372,14 +95439,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 @@ -122388,33 +95451,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 @@ -122445,14 +95485,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 @@ -122461,33 +95497,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 @@ -122518,14 +95531,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 @@ -122533,33 +95542,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 @@ -122590,14 +95576,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 @@ -122605,33 +95587,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 @@ -122661,47 +95620,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 @@ -122730,14 +95662,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 @@ -122745,33 +95673,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 @@ -122801,14 +95706,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 @@ -122816,33 +95717,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 @@ -122872,47 +95750,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 @@ -122941,14 +95792,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 @@ -122956,33 +95803,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 @@ -123012,14 +95836,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 @@ -123027,33 +95847,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 @@ -123083,47 +95880,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 @@ -123152,14 +95922,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 @@ -123167,33 +95933,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 @@ -123223,14 +95966,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 @@ -123238,33 +95977,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 @@ -123294,47 +96010,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 @@ -123363,14 +96052,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 @@ -123378,33 +96063,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 @@ -123434,14 +96096,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 @@ -123449,33 +96107,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 @@ -123505,14 +96140,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 @@ -123520,33 +96151,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 @@ -123576,14 +96184,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 @@ -123591,33 +96195,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 @@ -123647,47 +96228,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 @@ -123717,14 +96271,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 @@ -123733,33 +96283,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: @@ -123791,14 +96318,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 @@ -123807,33 +96330,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 @@ -123864,14 +96364,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 @@ -123880,33 +96376,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 @@ -123937,14 +96410,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 @@ -123953,33 +96422,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 @@ -124010,14 +96456,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 @@ -124026,33 +96468,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 @@ -124083,14 +96502,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 @@ -124098,33 +96513,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 @@ -124155,14 +96547,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 @@ -124170,33 +96558,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 @@ -124226,15 +96591,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 @@ -124242,36 +96603,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 @@ -124302,15 +96637,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 @@ -124318,36 +96649,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 @@ -124378,51 +96683,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 @@ -124452,47 +96726,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 @@ -124521,47 +96768,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 @@ -131979,14 +104199,10 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve - (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 = UnitTesting::Attributes::Boolean::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132030,33 +104246,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 = UnitTesting::Attributes::Boolean::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Boolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132085,14 +104278,10 @@ + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingBitmap8AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132136,33 +104325,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 MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132191,14 +104357,10 @@ + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)att - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingBitmap16AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132242,33 +104404,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 MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132297,14 +104436,10 @@ + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingBitmap32AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132348,33 +104483,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 MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132403,14 +104515,10 @@ + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingBitmap64AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132454,33 +104562,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 MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132509,14 +104594,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 = UnitTesting::Attributes::Int8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132560,33 +104641,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 = UnitTesting::Attributes::Int8u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132615,14 +104673,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 = UnitTesting::Attributes::Int16u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132666,33 +104720,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 = UnitTesting::Attributes::Int16u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132721,14 +104752,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 = UnitTesting::Attributes::Int24u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132772,33 +104799,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 = UnitTesting::Attributes::Int24u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int24u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132827,14 +104831,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 = UnitTesting::Attributes::Int32u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132878,33 +104878,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 = UnitTesting::Attributes::Int32u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int32u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -132933,14 +104910,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 = UnitTesting::Attributes::Int40u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -132984,33 +104957,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 = UnitTesting::Attributes::Int40u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int40u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133039,14 +104989,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 = UnitTesting::Attributes::Int48u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133090,33 +105036,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 = UnitTesting::Attributes::Int48u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int48u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133145,14 +105068,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 = UnitTesting::Attributes::Int56u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133196,33 +105115,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 = UnitTesting::Attributes::Int56u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int56u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133251,14 +105147,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 = UnitTesting::Attributes::Int64u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133302,33 +105194,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 = UnitTesting::Attributes::Int64u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int64u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133357,14 +105226,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 = UnitTesting::Attributes::Int8s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133408,33 +105273,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 = UnitTesting::Attributes::Int8s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133463,14 +105305,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 = UnitTesting::Attributes::Int16s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133514,33 +105352,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 = UnitTesting::Attributes::Int16s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133569,14 +105384,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 = UnitTesting::Attributes::Int24s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133620,33 +105431,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 = UnitTesting::Attributes::Int24s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int24s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133675,14 +105463,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 = UnitTesting::Attributes::Int32s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133726,33 +105510,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 = UnitTesting::Attributes::Int32s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int32s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133781,14 +105542,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 = UnitTesting::Attributes::Int40s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133832,33 +105589,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 = UnitTesting::Attributes::Int40s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int40s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133887,14 +105621,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 = UnitTesting::Attributes::Int48s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -133938,33 +105668,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 = UnitTesting::Attributes::Int48s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int48s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -133993,14 +105700,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 = UnitTesting::Attributes::Int56s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134044,33 +105747,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 = UnitTesting::Attributes::Int56s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int56s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134099,14 +105779,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 = UnitTesting::Attributes::Int64s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134150,33 +105826,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 = UnitTesting::Attributes::Int64s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Int64s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134205,14 +105858,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 = UnitTesting::Attributes::Enum8::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134256,33 +105905,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 = UnitTesting::Attributes::Enum8::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Enum8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134311,14 +105937,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 = UnitTesting::Attributes::Enum16::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134362,33 +105984,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 = UnitTesting::Attributes::Enum16::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Enum16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134417,14 +106016,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 = UnitTesting::Attributes::FloatSingle::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134468,33 +106063,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 = UnitTesting::Attributes::FloatSingle::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::FloatSingle::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134523,14 +106095,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 = UnitTesting::Attributes::FloatDouble::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134574,33 +106142,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 = UnitTesting::Attributes::FloatDouble::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::FloatDouble::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134629,14 +106174,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 = UnitTesting::Attributes::OctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134680,33 +106221,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 = UnitTesting::Attributes::OctetString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::OctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134735,14 +106253,10 @@ + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer * - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingListInt8uListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingListInt8uListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134807,34 +106321,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 MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingListInt8uListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134863,14 +106353,10 @@ + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)a - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingListOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -134935,34 +106421,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 MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -134992,15 +106454,10 @@ + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135067,35 +106524,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 MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListStructOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135126,14 +106558,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 = UnitTesting::Attributes::LongOctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135177,33 +106605,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 = UnitTesting::Attributes::LongOctetString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::LongOctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135232,14 +106637,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 = UnitTesting::Attributes::CharString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135283,33 +106684,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 = UnitTesting::Attributes::CharString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::CharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135338,14 +106716,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 = UnitTesting::Attributes::LongCharString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135389,33 +106763,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 = UnitTesting::Attributes::LongCharString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::LongCharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135444,14 +106795,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 = UnitTesting::Attributes::EpochUs::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135495,33 +106842,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 = UnitTesting::Attributes::EpochUs::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::EpochUs::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135550,14 +106874,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 = UnitTesting::Attributes::EpochS::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135601,33 +106921,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 = UnitTesting::Attributes::EpochS::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::EpochS::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135656,14 +106953,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 = UnitTesting::Attributes::VendorId::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -135707,33 +107000,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 = UnitTesting::Attributes::VendorId::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::VendorId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -135763,15 +107033,11 @@ + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136010,36 +107276,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 MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListNullablesAndOptionalsStructListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136070,14 +107310,10 @@ + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttri - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterSimpleEnumAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136121,34 +107357,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 MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingClusterSimpleEnumAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136178,14 +107390,11 @@ + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)at - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingStructAttrStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingStructAttrStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value @@ -136238,34 +107447,10 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingStructAttrStructAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136295,14 +107480,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 = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136347,33 +107528,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 = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136403,14 +107561,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 = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136455,33 +107609,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 = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136511,14 +107642,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 = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136563,33 +107690,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 = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136619,14 +107723,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 = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136671,33 +107771,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 = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136727,15 +107804,10 @@ + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheC - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -136801,35 +107873,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 MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListLongOctetStringListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -136862,15 +107909,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 MTRUnitTestingListFabricScopedListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb, params.filterByFabric); - }); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::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 @@ -136991,35 +108032,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 MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingListFabricScopedListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137049,14 +108065,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 = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137100,33 +108112,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 = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137155,14 +108144,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 = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137207,33 +108192,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 = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137263,14 +108225,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 = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137315,33 +108273,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 = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137371,14 +108306,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 = UnitTesting::Attributes::Unsupported::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137422,33 +108353,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 = UnitTesting::Attributes::Unsupported::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::Unsupported::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137477,14 +108385,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 = UnitTesting::Attributes::NullableBoolean::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137533,33 +108437,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 = UnitTesting::Attributes::NullableBoolean::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableBoolean::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137588,14 +108469,10 @@ + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingNullableBitmap8AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137644,34 +108521,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 MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap8AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137700,14 +108553,10 @@ + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContain - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingNullableBitmap16AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137756,34 +108605,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 MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap16AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137812,14 +108637,10 @@ + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingNullableBitmap32AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137868,34 +108689,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 MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap32AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -137924,14 +108721,10 @@ + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingNullableBitmap64AttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -137980,34 +108773,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 MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingNullableBitmap64AttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138036,14 +108805,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 = UnitTesting::Attributes::NullableInt8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138092,33 +108857,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 = UnitTesting::Attributes::NullableInt8u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138147,14 +108889,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 = UnitTesting::Attributes::NullableInt16u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138203,33 +108941,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 = UnitTesting::Attributes::NullableInt16u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138258,14 +108973,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 = UnitTesting::Attributes::NullableInt24u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138314,33 +109025,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 = UnitTesting::Attributes::NullableInt24u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt24u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138369,14 +109057,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 = UnitTesting::Attributes::NullableInt32u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138425,33 +109109,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 = UnitTesting::Attributes::NullableInt32u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt32u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138480,14 +109141,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 = UnitTesting::Attributes::NullableInt40u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138536,33 +109193,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 = UnitTesting::Attributes::NullableInt40u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt40u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138591,14 +109225,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 = UnitTesting::Attributes::NullableInt48u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138647,33 +109277,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 = UnitTesting::Attributes::NullableInt48u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt48u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -138702,14 +109309,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 = UnitTesting::Attributes::NullableInt56u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138739,118 +109342,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt56u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::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 = UnitTesting::Attributes::NullableInt64u::TypeInfo; - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt64u::TypeInfo; + using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -138865,39 +109357,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 = UnitTesting::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 = UnitTesting::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 = UnitTesting::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 = UnitTesting::Attributes::NullableInt64u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } chip::Controller::UnitTestingCluster 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 = UnitTesting::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 @@ -138924,14 +109477,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 = UnitTesting::Attributes::NullableInt8s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -138980,33 +109529,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 = UnitTesting::Attributes::NullableInt8s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139035,14 +109561,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 = UnitTesting::Attributes::NullableInt16s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139091,33 +109613,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 = UnitTesting::Attributes::NullableInt16s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139146,14 +109645,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 = UnitTesting::Attributes::NullableInt24s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139202,33 +109697,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 = UnitTesting::Attributes::NullableInt24s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt24s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139257,14 +109729,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 = UnitTesting::Attributes::NullableInt32s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139313,33 +109781,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 = UnitTesting::Attributes::NullableInt32s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt32s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139368,14 +109813,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 = UnitTesting::Attributes::NullableInt40s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139424,33 +109865,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 = UnitTesting::Attributes::NullableInt40s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt40s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139479,14 +109897,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 = UnitTesting::Attributes::NullableInt48s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139535,33 +109949,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 = UnitTesting::Attributes::NullableInt48s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt48s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139590,14 +109981,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 = UnitTesting::Attributes::NullableInt56s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139646,33 +110033,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 = UnitTesting::Attributes::NullableInt56s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt56s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139701,14 +110065,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 = UnitTesting::Attributes::NullableInt64s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139757,33 +110117,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 = UnitTesting::Attributes::NullableInt64s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableInt64s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139812,14 +110149,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 = UnitTesting::Attributes::NullableEnum8::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139868,33 +110201,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 = UnitTesting::Attributes::NullableEnum8::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableEnum8::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -139923,14 +110233,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 = UnitTesting::Attributes::NullableEnum16::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -139979,33 +110285,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 = UnitTesting::Attributes::NullableEnum16::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableEnum16::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140034,14 +110317,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 = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140091,33 +110370,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 = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140147,14 +110403,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 = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140204,33 +110456,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 = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140260,14 +110489,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 = UnitTesting::Attributes::NullableOctetString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140316,33 +110541,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 = UnitTesting::Attributes::NullableOctetString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableOctetString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140371,14 +110573,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 = UnitTesting::Attributes::NullableCharString::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140428,33 +110626,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 = UnitTesting::Attributes::NullableCharString::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableCharString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140484,15 +110659,10 @@ + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheCont - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableUnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140541,35 +110711,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 MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NullableUnitTestingClusterSimpleEnumAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140600,15 +110745,11 @@ + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContai - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingNullableStructStructAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value @@ -140668,35 +110809,10 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingNullableStructStructAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140728,14 +110844,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 = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140786,33 +110898,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 = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140843,14 +110932,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 = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -140901,33 +110986,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 = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -140958,14 +111020,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 = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -141016,33 +111074,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 = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141073,14 +111108,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 = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -141131,33 +111162,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 = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141187,14 +111195,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 = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 @@ -141238,33 +111242,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 = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141293,15 +111274,10 @@ + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -141309,35 +111285,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 MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141368,15 +111319,10 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheCo - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -141384,35 +111330,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 MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141443,48 +111364,20 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheCon - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitTestingAttributeListListAttributeCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, UnitTestingAttributeListListAttributeCallback successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - if (!params.resubscribeIfLost) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; - - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, - [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], - MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { typedBridge->OnDone(); }); - if (err == CHIP_NO_ERROR) { - // Now that we kicked off the subscribe, flag our callback bridge - // to stay alive until we get an OnDone. - typedBridge->KeepAliveOnCallback(); - } - return err; - }, - subscriptionEstablished); - std::move(*bridge).DispatchAction(self.device); + using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141513,47 +111406,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 = UnitTesting::Attributes::FeatureMap::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 = UnitTesting::Attributes::FeatureMap::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer @@ -141582,47 +111448,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 = UnitTesting::Attributes::ClusterRevision::TypeInfo; - chip::Controller::UnitTestingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(bridge, successCb, failureCb); - }); - std::move(*bridge).DispatchAction(self.device); + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::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 = UnitTesting::Attributes::ClusterRevision::TypeInfo; - - chip::Controller::UnitTestingCluster 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 = UnitTesting::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 3fb5690c98885e..d300ece5fd7c93 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 MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { - auto * self = static_cast(context); - if (!self->mQueue) { + if (!mQueue) { return; } - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); // On failure, 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 6d4b97a1e6d209..cf558413edde30 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 MTRUnitTestingBitmap8AttributeCallbackSubscriptionBridge : public MTRUnitT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingBitmap8AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingBitmap8AttributeCallbackBridge::OnDone; @@ -10244,7 +10244,7 @@ class MTRUnitTestingBitmap16AttributeCallbackSubscriptionBridge : public MTRUnit mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingBitmap16AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingBitmap16AttributeCallbackBridge::OnDone; @@ -10274,7 +10274,7 @@ class MTRUnitTestingBitmap32AttributeCallbackSubscriptionBridge : public MTRUnit mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingBitmap32AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingBitmap32AttributeCallbackBridge::OnDone; @@ -10304,7 +10304,7 @@ class MTRUnitTestingBitmap64AttributeCallbackSubscriptionBridge : public MTRUnit mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingBitmap64AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingBitmap64AttributeCallbackBridge::OnDone; @@ -10334,7 +10334,7 @@ class MTRUnitTestingListInt8uListAttributeCallbackSubscriptionBridge : public MT mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListInt8uListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListInt8uListAttributeCallbackBridge::OnDone; @@ -10367,7 +10367,7 @@ class MTRUnitTestingListOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListOctetStringListAttributeCallbackBridge::OnDone; @@ -10403,7 +10403,7 @@ class MTRUnitTestingListStructOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListStructOctetStringListAttributeCallbackBridge::OnDone; @@ -10438,7 +10438,7 @@ class MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackSubscrip mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone; @@ -10469,7 +10469,7 @@ class MTRUnitTestingStructAttrStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingStructAttrStructAttributeCallbackBridge::OnDone; @@ -10502,7 +10502,7 @@ class MTRUnitTestingListLongOctetStringListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListLongOctetStringListAttributeCallbackBridge::OnDone; @@ -10538,7 +10538,7 @@ class MTRUnitTestingListFabricScopedListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingListFabricScopedListAttributeCallbackBridge::OnDone; @@ -10570,7 +10570,7 @@ class MTRUnitTestingNullableBitmap8AttributeCallbackSubscriptionBridge : public mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingNullableBitmap8AttributeCallbackBridge::OnDone; @@ -10603,7 +10603,7 @@ class MTRUnitTestingNullableBitmap16AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingNullableBitmap16AttributeCallbackBridge::OnDone; @@ -10636,7 +10636,7 @@ class MTRUnitTestingNullableBitmap32AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingNullableBitmap32AttributeCallbackBridge::OnDone; @@ -10669,7 +10669,7 @@ class MTRUnitTestingNullableBitmap64AttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingNullableBitmap64AttributeCallbackBridge::OnDone; @@ -10704,7 +10704,7 @@ class MTRUnitTestingNullableStructStructAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingNullableStructStructAttributeCallbackBridge::OnDone; @@ -10737,7 +10737,7 @@ class MTRUnitTestingGeneratedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingGeneratedCommandListListAttributeCallbackBridge::OnDone; @@ -10770,7 +10770,7 @@ class MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingAcceptedCommandListListAttributeCallbackBridge::OnDone; @@ -10802,7 +10802,7 @@ class MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingAttributeListListAttributeCallbackBridge::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 MTRUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRUnitTestingClusterSimpleEnumAttributeCallbackBridge::OnDone; @@ -19280,7 +19280,7 @@ class MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackSubscriptionBridge mEstablishedHandler(establishedHandler) {} - static void OnSubscriptionEstablished(void * context); + void OnSubscriptionEstablished(); using MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; using MTRNullableUnitTestingClusterSimpleEnumAttributeCallbackBridge::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 9ed05837ea22a9..b096079d2328ff 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 */,